From d5f49f84c360bd4716ea6b209ef5a74141535154 Mon Sep 17 00:00:00 2001 From: ald_productions Date: Sat, 4 Jul 2026 10:15:09 -0700 Subject: [PATCH 1/2] Remove unused flags to make them easier to split and filter out Methodology: A flag was considered unused if it was exclusively mentioned in deffinitions and the "DiscordLike" flag list. If a flag was seen being used anywhere else in the code, it was left as-is. --- .gitignore | 5 +- .../Models/Spacebar.Models.AdminApi/Rights.cs | 62 +++++++++---------- scripts/rights.js | 20 +++--- src/util/util/Permissions.ts | 2 +- src/util/util/Rights.ts | 62 +++++++++---------- 5 files changed, 77 insertions(+), 74 deletions(-) diff --git a/.gitignore b/.gitignore index 43981ba3f..45a5b1870 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,9 @@ result jwt.key* bun.lock +#Created by IDEs +.project + # optional generated outputs from schema.js schemas_orig/ schemas_nested/ @@ -31,4 +34,4 @@ schemas_final/ temp/ !/extra/admin-api/Utilities/Spacebar.AdminApi.TestClient/wwwroot/lib/bootstrap/dist/ -*.qcow2 \ No newline at end of file +*.qcow2 diff --git a/extra/admin-api/Models/Spacebar.Models.AdminApi/Rights.cs b/extra/admin-api/Models/Spacebar.Models.AdminApi/Rights.cs index 62785f5e3..596dcc488 100644 --- a/extra/admin-api/Models/Spacebar.Models.AdminApi/Rights.cs +++ b/extra/admin-api/Models/Spacebar.Models.AdminApi/Rights.cs @@ -7,38 +7,38 @@ public static class SpacebarRights { [SuppressMessage("ReSharper", "InconsistentNaming")] public enum Rights : ulong { OPERATOR = 1ul << 0, // has all rights - MANAGE_APPLICATIONS = 1ul << 1, + UNUSED_1 = 1ul << 1, MANAGE_GUILDS = 1ul << 2, // Manage all guilds instance-wide MANAGE_MESSAGES = 1ul << 3, // Can't see other messages but delete/edit them in channels that they can see - MANAGE_RATE_LIMITS = 1ul << 4, - MANAGE_ROUTING = 1ul << 5, // can create custom message routes to any channel/guild - MANAGE_TICKETS = 1ul << 6, // can respond to and resolve support tickets + UNUSED_2 = 1ul << 4, + UNUSED_3 = 1ul << 5, + UNUSED_4 = 1ul << 6, MANAGE_USERS = 1ul << 7, - ADD_MEMBERS = 1ul << 8, // can manually add any members in their guilds + UNUSED_5 = 1ul << 8, BYPASS_RATE_LIMITS = 1ul << 9, - CREATE_APPLICATIONS = 1ul << 10, - CREATE_CHANNELS = 1ul << 11, // can create guild channels or threads in the guilds that they have permission - CREATE_DMS = 1ul << 12, - CREATE_DM_GROUPS = 1ul << 13, // can create group DMs or custom orphan channels + UNUSED_6 = 1ul << 10, + UNUSED_7 = 1ul << 11, + UNUSED_8 = 1ul << 12, + UNUSED_9 = 1ul << 13, CREATE_GUILDS = 1ul << 14, CREATE_INVITES = 1ul << 15, // can create mass invites in the guilds that they have CREATE_INSTANT_INVITE - CREATE_ROLES = 1ul << 16, - CREATE_TEMPLATES = 1ul << 17, - CREATE_WEBHOOKS = 1ul << 18, + UNUSED_10 = 1ul << 16, + UNUSED_11 = 1ul << 17, + UNUSED_12 = 1ul << 18, JOIN_GUILDS = 1ul << 19, - PIN_MESSAGES = 1ul << 20, + UNUSED_13 = 1ul << 20, SELF_ADD_REACTIONS = 1ul << 21, SELF_DELETE_MESSAGES = 1ul << 22, SELF_EDIT_MESSAGES = 1ul << 23, - SELF_EDIT_NAME = 1ul << 24, + UNUSED_14 = 1ul << 24, SEND_MESSAGES = 1ul << 25, - USE_ACTIVITIES = 1ul << 26, // use (game) activities in voice channels (e.g. Watch together) - USE_VIDEO = 1ul << 27, - USE_VOICE = 1ul << 28, - INVITE_USERS = 1ul << 29, // can create user-specific invites in the guilds that they have INVITE_USERS - SELF_DELETE_DISABLE = 1ul << 30, // can disable/delete own account - DEBTABLE = 1ul << 31, // can use pay-to-use features - CREDITABLE = 1ul << 32, // can receive money from monetisation related features + UNUSED_15 = 1ul << 26, + UNUSED_16 = 1ul << 27, + UNUSED_17 = 1ul << 28, + UNUSED_18 = 1ul << 29, + UNUSED_19 = 1ul << 30, + UNUSED_20 = 1ul << 31, + UNUSED_21 = 1ul << 32, KICK_BAN_MEMBERS = 1ul << 33, // can kick or ban guild or group DM members in the guilds/groups that they have KICK_MEMBERS, or BAN_MEMBERS @@ -48,18 +48,18 @@ public static class SpacebarRights { PRESENCE = 1ul << 35, // inverts the presence confidentiality default (OPERATOR's presence is not routed by default, others' are) for a given user - SELF_ADD_DISCOVERABLE = 1ul << 36, // can mark discoverable guilds that they have permissions to mark as discoverable - MANAGE_GUILD_DIRECTORY = 1ul << 37, // can change anything in the primary guild directory - POGGERS = 1ul << 38, // can send confetti, screenshake, random user mention (@someone) - USE_ACHIEVEMENTS = 1ul << 39, // can use achievements and cheers - INITIATE_INTERACTIONS = 1ul << 40, // can initiate interactions - RESPOND_TO_INTERACTIONS = 1ul << 41, // can respond to interactions + UNUSED_22 = 1ul << 36, + UNUSED_23 = 1ul << 37, + UNUSED_24 = 1ul << 38, + UNUSED_25 = 1ul << 39, // can use achievements and cheers + UNUSED_26 = 1ul << 40, // can initiate interactions + UNUSED_27 = 1ul << 41, // can respond to interactions SEND_BACKDATED_EVENTS = 1ul << 42, // can send backdated events USE_MASS_INVITES = 1ul << 43, // added per @xnacly's request - can accept mass invites - ACCEPT_INVITES = 1ul << 44, // added per @xnacly's request - can accept user-specific invites and DM requests - SELF_EDIT_FLAGS = 1ul << 45, // can modify own flags - EDIT_FLAGS = 1ul << 46, // can set others' flags - MANAGE_GROUPS = 1ul << 47, // can manage others' groups + UNUSED_28 = 1ul << 44, // added per @xnacly's request - can accept user-specific invites and DM requests + UNUSED_29 = 1ul << 45, // can modify own flags + UNUSED_30 = 1ul << 46, // can set others' flags + UNUSED_31 = 1ul << 47, // can manage others' groups VIEW_SERVER_STATS = 1ul << 48, // added per @chrischrome's request - can view server stats RESEND_VERIFICATION_EMAIL = 1ul << 49, // can resend verification emails (/auth/verify/resend) CREATE_REGISTRATION_TOKENS = 1ul << 50, // can create registration tokens (/auth/generate-registration-tokens) diff --git a/scripts/rights.js b/scripts/rights.js index bf79ef79b..f237aea13 100644 --- a/scripts/rights.js +++ b/scripts/rights.js @@ -28,19 +28,19 @@ console.log(`All rights:`, allRights); var discordLike = allRights; discordLike -= Rights.FLAGS.OPERATOR; -discordLike -= Rights.FLAGS.MANAGE_APPLICATIONS; +discordLike -= Rights.FLAGS.UNUSED_1; discordLike -= Rights.FLAGS.MANAGE_MESSAGES; -discordLike -= Rights.FLAGS.MANAGE_RATE_LIMITS; -discordLike -= Rights.FLAGS.MANAGE_ROUTING; -discordLike -= Rights.FLAGS.MANAGE_TICKETS; +discordLike -= Rights.FLAGS.UNUSED_2; +discordLike -= Rights.FLAGS.UNUSED_3; +discordLike -= Rights.FLAGS.UNUSED_4; discordLike -= Rights.FLAGS.MANAGE_USERS; discordLike -= Rights.FLAGS.MANAGE_GUILDS; -discordLike -= Rights.FLAGS.ADD_MEMBERS; +discordLike -= Rights.FLAGS.UNUSED_5; discordLike -= Rights.FLAGS.BYPASS_RATE_LIMITS; -discordLike -= Rights.FLAGS.CREDITABLE; -discordLike -= Rights.FLAGS.MANAGE_GUILD_DIRECTORY; +discordLike -= Rights.FLAGS.UNUSED_21; +discordLike -= Rights.FLAGS.UNUSED_23; discordLike -= Rights.FLAGS.SEND_BACKDATED_EVENTS; -discordLike -= Rights.FLAGS.EDIT_FLAGS; -discordLike -= Rights.FLAGS.SELF_EDIT_FLAGS; -discordLike -= Rights.FLAGS.MANAGE_GROUPS; +discordLike -= Rights.FLAGS.UNUSED_30; +discordLike -= Rights.FLAGS.UNUSED_29; +discordLike -= Rights.FLAGS.UNUSED_31; console.log(`Discord.com-like rights:`, discordLike); diff --git a/src/util/util/Permissions.ts b/src/util/util/Permissions.ts index adb1ad5e5..490ec01ae 100644 --- a/src/util/util/Permissions.ts +++ b/src/util/util/Permissions.ts @@ -78,7 +78,7 @@ export class Permissions extends BitField { SET_VOICE_CHANNEL_STATUS: BitFlag(48), SEND_POLLS: BitFlag(49), USE_EXTERNAL_APPS: BitFlag(50), - PIN_MESSAGES: BitFlag(51), + UNUSED_13: BitFlag(51), BYPASS_SLOWMODE: BitFlag(52), /** diff --git a/src/util/util/Rights.ts b/src/util/util/Rights.ts index 0eee0a3f8..cb94d0936 100644 --- a/src/util/util/Rights.ts +++ b/src/util/util/Rights.ts @@ -35,56 +35,56 @@ export class Rights extends BitField { static FLAGS = { OPERATOR: BitFlag(0), // has all rights - MANAGE_APPLICATIONS: BitFlag(1), + UNUSED_1: BitFlag(1), MANAGE_GUILDS: BitFlag(2), // Manage all guilds instance-wide MANAGE_MESSAGES: BitFlag(3), // Can't see other messages but delete/edit them in channels that they can see - MANAGE_RATE_LIMITS: BitFlag(4), - MANAGE_ROUTING: BitFlag(5), // can create custom message routes to any channel/guild - MANAGE_TICKETS: BitFlag(6), // can respond to and resolve support tickets + UNUSED_2: BitFlag(4), + UNUSED_3: BitFlag(5), + UNUSED_4: BitFlag(6), MANAGE_USERS: BitFlag(7), - ADD_MEMBERS: BitFlag(8), // can manually add any members in their guilds + UNUSED_5: BitFlag(8), BYPASS_RATE_LIMITS: BitFlag(9), - CREATE_APPLICATIONS: BitFlag(10), - CREATE_CHANNELS: BitFlag(11), // can create guild channels or threads in the guilds that they have permission - CREATE_DMS: BitFlag(12), - CREATE_DM_GROUPS: BitFlag(13), // can create group DMs or custom orphan channels + UNUSED_6: BitFlag(10), + UNUSED_7: BitFlag(11), + UNUSED_8: BitFlag(12), + UNUSED_9: BitFlag(13), CREATE_GUILDS: BitFlag(14), CREATE_INVITES: BitFlag(15), // can create mass invites in the guilds that they have CREATE_INSTANT_INVITE - CREATE_ROLES: BitFlag(16), - CREATE_TEMPLATES: BitFlag(17), - CREATE_WEBHOOKS: BitFlag(18), + UNUSED_10: BitFlag(16), + UNUSED_11: BitFlag(17), + UNUSED_12: BitFlag(18), JOIN_GUILDS: BitFlag(19), - PIN_MESSAGES: BitFlag(20), + UNUSED_13: BitFlag(20), SELF_ADD_REACTIONS: BitFlag(21), SELF_DELETE_MESSAGES: BitFlag(22), SELF_EDIT_MESSAGES: BitFlag(23), - SELF_EDIT_NAME: BitFlag(24), + UNUSED_14: BitFlag(24), SEND_MESSAGES: BitFlag(25), - USE_ACTIVITIES: BitFlag(26), // use (game) activities in voice channels (e.g. Watch together) - USE_VIDEO: BitFlag(27), - USE_VOICE: BitFlag(28), - INVITE_USERS: BitFlag(29), // can create user-specific invites in the guilds that they have INVITE_USERS - SELF_DELETE_DISABLE: BitFlag(30), // can disable/delete own account - DEBTABLE: BitFlag(31), // can use pay-to-use features - CREDITABLE: BitFlag(32), // can receive money from monetisation related features + UNUSED_15: BitFlag(26), + UNUSED_16: BitFlag(27), + UNUSED_17: BitFlag(28), + UNUSED_18: BitFlag(29), + UNUSED_19: BitFlag(30), + UNUSED_20: BitFlag(31), + UNUSED_21: BitFlag(32), KICK_BAN_MEMBERS: BitFlag(33), // can kick or ban guild or group DM members in the guilds/groups that they have KICK_MEMBERS, or BAN_MEMBERS SELF_LEAVE_GROUPS: BitFlag(34), // can leave the guilds or group DMs that they joined on their own (one can always leave a guild or group DMs they have been force-added) PRESENCE: BitFlag(35), // inverts the presence confidentiality default (OPERATOR's presence is not routed by default, others' are) for a given user - SELF_ADD_DISCOVERABLE: BitFlag(36), // can mark discoverable guilds that they have permissions to mark as discoverable - MANAGE_GUILD_DIRECTORY: BitFlag(37), // can change anything in the primary guild directory - POGGERS: BitFlag(38), // can send confetti, screenshake, random user mention (@someone) - USE_ACHIEVEMENTS: BitFlag(39), // can use achievements and cheers - INITIATE_INTERACTIONS: BitFlag(40), // can initiate interactions - RESPOND_TO_INTERACTIONS: BitFlag(41), // can respond to interactions + UNUSED_22: BitFlag(36), + UNUSED_23: BitFlag(37), + UNUSED_24: BitFlag(38), + UNUSED_25: BitFlag(39), + UNUSED_26: BitFlag(40), + UNUSED_27: BitFlag(41), SEND_BACKDATED_EVENTS: BitFlag(42), // can send backdated events USE_MASS_INVITES: BitFlag(43), // added per @xnacly's request - can accept mass invites - ACCEPT_INVITES: BitFlag(44), // added per @xnacly's request - can accept user-specific invites and DM requests - SELF_EDIT_FLAGS: BitFlag(45), // can modify own flags - EDIT_FLAGS: BitFlag(46), // can set others' flags - MANAGE_GROUPS: BitFlag(47), // can manage others' groups + UNUSED_28: BitFlag(44), + UNUSED_29: BitFlag(45), + UNUSED_30: BitFlag(46), + UNUSED_31: BitFlag(47), VIEW_SERVER_STATS: BitFlag(48), // added per @chrischrome's request - can view server stats) RESEND_VERIFICATION_EMAIL: BitFlag(49), // can resend verification emails (/auth/verify/resend) CREATE_REGISTRATION_TOKENS: BitFlag(50), // can create registration tokens (/auth/generate-registration-tokens) From 1cfe3bee62d9b203ebed3c2224a8517f19698ddc Mon Sep 17 00:00:00 2001 From: ald_productions Date: Sat, 4 Jul 2026 14:53:36 -0700 Subject: [PATCH 2/2] Add comments explaining what each unused right used to be --- .../Models/Spacebar.Models.AdminApi/Rights.cs | 62 +++++++++---------- src/util/util/Rights.ts | 60 +++++++++--------- 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/extra/admin-api/Models/Spacebar.Models.AdminApi/Rights.cs b/extra/admin-api/Models/Spacebar.Models.AdminApi/Rights.cs index 596dcc488..2928be1e4 100644 --- a/extra/admin-api/Models/Spacebar.Models.AdminApi/Rights.cs +++ b/extra/admin-api/Models/Spacebar.Models.AdminApi/Rights.cs @@ -7,38 +7,38 @@ public static class SpacebarRights { [SuppressMessage("ReSharper", "InconsistentNaming")] public enum Rights : ulong { OPERATOR = 1ul << 0, // has all rights - UNUSED_1 = 1ul << 1, + UNUSED_1 = 1ul << 1, //PREVIOUS IDENTITY: MANAGE_APPLICATIONS MANAGE_GUILDS = 1ul << 2, // Manage all guilds instance-wide MANAGE_MESSAGES = 1ul << 3, // Can't see other messages but delete/edit them in channels that they can see - UNUSED_2 = 1ul << 4, - UNUSED_3 = 1ul << 5, - UNUSED_4 = 1ul << 6, + UNUSED_2 = 1ul << 4, //PREVIOUS IDENTITY: MANAGE_RATE_LIMITS + UNUSED_3 = 1ul << 5, //PREVIOUS_IDENTITY: MANAGE_ROUTING - can create custom message routes to any channel/guild + UNUSED_4 = 1ul << 6, //PREVIOUS_IDENTITY: MANAGE_TICKETS - can respond to and resolve support tickets MANAGE_USERS = 1ul << 7, - UNUSED_5 = 1ul << 8, + UNUSED_5 = 1ul << 8, //PREVIOUS_IDENTITY: ADD_MEMBERS - can manually add any members in their guilds BYPASS_RATE_LIMITS = 1ul << 9, - UNUSED_6 = 1ul << 10, - UNUSED_7 = 1ul << 11, - UNUSED_8 = 1ul << 12, - UNUSED_9 = 1ul << 13, + UNUSED_6 = 1ul << 10, //PREVIOUS IDENTITY: CREATE_APPLICATIONS + UNUSED_7 = 1ul << 11, //PREVIOUS IDENTITY: CREATE_CHANNELS - can create guild channels or threads in the guilds that they have permission + UNUSED_8 = 1ul << 12, //PREVIOUS IDENTITY: CREATE_DMS + UNUSED_9 = 1ul << 13, //PREVIOUS IDENTITY: CREATE_DM_GROUPS - can create group DMs or custom orphan channels CREATE_GUILDS = 1ul << 14, CREATE_INVITES = 1ul << 15, // can create mass invites in the guilds that they have CREATE_INSTANT_INVITE - UNUSED_10 = 1ul << 16, - UNUSED_11 = 1ul << 17, - UNUSED_12 = 1ul << 18, + UNUSED_10 = 1ul << 16, //PREVIOUS IDENTITY: CREATE_ROLES + UNUSED_11 = 1ul << 17, //PREVIOUS IDENTITY: CREATE_TEMPLATES + UNUSED_12 = 1ul << 18, //PREVIOUS IDENTITY: CREATE_WEBHOOKS JOIN_GUILDS = 1ul << 19, - UNUSED_13 = 1ul << 20, + UNUSED_13 = 1ul << 20, //PREVIOUS IDENTITY: PIN_MESSAGES SELF_ADD_REACTIONS = 1ul << 21, SELF_DELETE_MESSAGES = 1ul << 22, SELF_EDIT_MESSAGES = 1ul << 23, - UNUSED_14 = 1ul << 24, + UNUSED_14 = 1ul << 24, //PREVIOUS IDENTITY: SELF_EDIT_NAME SEND_MESSAGES = 1ul << 25, - UNUSED_15 = 1ul << 26, - UNUSED_16 = 1ul << 27, - UNUSED_17 = 1ul << 28, - UNUSED_18 = 1ul << 29, - UNUSED_19 = 1ul << 30, - UNUSED_20 = 1ul << 31, - UNUSED_21 = 1ul << 32, + UNUSED_15 = 1ul << 26, //PREVIOUS IDENTITY: USE_ACTIVITIES - use (game) activities in voice channels (e.g. Watch together) + UNUSED_16 = 1ul << 27, //PREVIOUS IDENTITY: USE_VIDEO + UNUSED_17 = 1ul << 28, //PREVIOUS IDENTITY: USE_VOICE + UNUSED_18 = 1ul << 29, //PREVIOUS IDENTITY: INVITE_USERS + UNUSED_19 = 1ul << 30, //PREVIOUS IDENTITY: SELF_DELETE_DISABLE - can disable/delete own account + UNUSED_20 = 1ul << 31, //PREVIOUS IDENTITY: DEBTABLE - can use pay-to-use features + UNUSED_21 = 1ul << 32, //PREVIOUS IDENTITY: CREDITABLE - can receive money from monetisation related features KICK_BAN_MEMBERS = 1ul << 33, // can kick or ban guild or group DM members in the guilds/groups that they have KICK_MEMBERS, or BAN_MEMBERS @@ -48,18 +48,18 @@ public static class SpacebarRights { PRESENCE = 1ul << 35, // inverts the presence confidentiality default (OPERATOR's presence is not routed by default, others' are) for a given user - UNUSED_22 = 1ul << 36, - UNUSED_23 = 1ul << 37, - UNUSED_24 = 1ul << 38, - UNUSED_25 = 1ul << 39, // can use achievements and cheers - UNUSED_26 = 1ul << 40, // can initiate interactions - UNUSED_27 = 1ul << 41, // can respond to interactions + UNUSED_22 = 1ul << 36, //PREVIOUS IDENTITY: SELF_ADD_DISCOVERABLE - can mark discoverable guilds that they have permissions to mark as discoverable + UNUSED_23 = 1ul << 37, //PREVIOUS IDENTITY: MANAGE_GUILD_DIRECTORY - can change anything in the primary guild directory + UNUSED_24 = 1ul << 38, //PREVIOUS IDENTITY: POGGERS - can send confetti, screenshake, random user mention (@someone) + UNUSED_25 = 1ul << 39, //PREVIOUS IDENTITY: USE_ACHIEVEMENTS - can use achievements and cheers + UNUSED_26 = 1ul << 40, //PREVIOUS IDENTITY: INITIATE_INTERACTIONS - can initiate interactions + UNUSED_27 = 1ul << 41, //PREVIOUS IDENTITY: RESPOND_TO_INTERACTIONS - can respond to interactions SEND_BACKDATED_EVENTS = 1ul << 42, // can send backdated events USE_MASS_INVITES = 1ul << 43, // added per @xnacly's request - can accept mass invites - UNUSED_28 = 1ul << 44, // added per @xnacly's request - can accept user-specific invites and DM requests - UNUSED_29 = 1ul << 45, // can modify own flags - UNUSED_30 = 1ul << 46, // can set others' flags - UNUSED_31 = 1ul << 47, // can manage others' groups + UNUSED_28 = 1ul << 44, //PREVIOUS IDENTITY: ACCEPT INVITES - added per @xnacly's request - can accept user-specific invites and DM requests + UNUSED_29 = 1ul << 45, //PREVIOUS IDENTITY: SELF_EDIT_FLAGS - can modify own flags + UNUSED_30 = 1ul << 46, //PREVIOUS IDENTITY: EDIT_FLAGS - can set others' flags + UNUSED_31 = 1ul << 47, //PREVIOUS IDENTITY: MANAGE_GROUPS - can manage others' groups VIEW_SERVER_STATS = 1ul << 48, // added per @chrischrome's request - can view server stats RESEND_VERIFICATION_EMAIL = 1ul << 49, // can resend verification emails (/auth/verify/resend) CREATE_REGISTRATION_TOKENS = 1ul << 50, // can create registration tokens (/auth/generate-registration-tokens) diff --git a/src/util/util/Rights.ts b/src/util/util/Rights.ts index cb94d0936..a726e4270 100644 --- a/src/util/util/Rights.ts +++ b/src/util/util/Rights.ts @@ -38,53 +38,53 @@ export class Rights extends BitField { UNUSED_1: BitFlag(1), MANAGE_GUILDS: BitFlag(2), // Manage all guilds instance-wide MANAGE_MESSAGES: BitFlag(3), // Can't see other messages but delete/edit them in channels that they can see - UNUSED_2: BitFlag(4), - UNUSED_3: BitFlag(5), - UNUSED_4: BitFlag(6), + UNUSED_2: BitFlag(4), //PREVIOUS IDENTITY: MANAGE_RATE_LIMITS + UNUSED_3: BitFlag(5), //PREVIOUS IDENTITY: MANAGE_ROUTING - can create custom message routes to any channel/guild + UNUSED_4: BitFlag(6), //PREVIOUS IDENTITY: MANAGE_TICKETS - can respond to and resolve support tickets MANAGE_USERS: BitFlag(7), - UNUSED_5: BitFlag(8), + UNUSED_5: BitFlag(8), //PREVIOUS IDENTITY ADD_MEMBERS - can manually add any members in their guilds BYPASS_RATE_LIMITS: BitFlag(9), - UNUSED_6: BitFlag(10), - UNUSED_7: BitFlag(11), - UNUSED_8: BitFlag(12), - UNUSED_9: BitFlag(13), + UNUSED_6: BitFlag(10), //PREVIOUS IDENTITY: CREATE_APPLICATIONS + UNUSED_7: BitFlag(11), //PREVIOUS IDENTITY: CREATE_CHANNELS - can create guild channels or threads in the guilds that they have permission + UNUSED_8: BitFlag(12), //PREVIOUS IDENTITY: CREATE_DMS + UNUSED_9: BitFlag(13), //PREVIOUS IDENTITY: CREATE_DM_GROUPS - can create group DMs or custom orphan channels CREATE_GUILDS: BitFlag(14), CREATE_INVITES: BitFlag(15), // can create mass invites in the guilds that they have CREATE_INSTANT_INVITE - UNUSED_10: BitFlag(16), - UNUSED_11: BitFlag(17), - UNUSED_12: BitFlag(18), + UNUSED_10: BitFlag(16), //PREVIOUS IDENTITY: CREATE_ROLES + UNUSED_11: BitFlag(17), //PREVIOUS IDENTITY: CREATE_TEMPLATES + UNUSED_12: BitFlag(18), //PREVIOUS IDENTITY: CREATE_WEBHOOKS JOIN_GUILDS: BitFlag(19), - UNUSED_13: BitFlag(20), + UNUSED_13: BitFlag(20), //PREVIOUS IDENTITY: PIN_MESSAGES SELF_ADD_REACTIONS: BitFlag(21), SELF_DELETE_MESSAGES: BitFlag(22), SELF_EDIT_MESSAGES: BitFlag(23), - UNUSED_14: BitFlag(24), + UNUSED_14: BitFlag(24), //PREVIOUS IDENTITY: SELF_EDIT_NAME SEND_MESSAGES: BitFlag(25), - UNUSED_15: BitFlag(26), - UNUSED_16: BitFlag(27), - UNUSED_17: BitFlag(28), - UNUSED_18: BitFlag(29), - UNUSED_19: BitFlag(30), - UNUSED_20: BitFlag(31), - UNUSED_21: BitFlag(32), + UNUSED_15: BitFlag(26), //PREVIOUS IDENTITY: USE_ACTIVITIES - use (game) activities in voice channels (e.g. Watch together) + UNUSED_16: BitFlag(27), //PREVIOUS IDENTITY: USE_VIDEO + UNUSED_17: BitFlag(28), //PREVIOUS IDENTITY: USE_VOICE + UNUSED_18: BitFlag(29), //PREVIOUS IDENTITY: INVITE_USERS - can create user-specific invites in the guilds that they have INVITE_USERS + UNUSED_19: BitFlag(30), //PREVIOUS IDENTITY: SELF_DELETE_DISABLE - can disable/delete own account + UNUSED_20: BitFlag(31), //PREVIOUS IDENTITY: DEBTABLE -can use pay-to-use features + UNUSED_21: BitFlag(32), //PREVIOUS IDENTITY: CREDITABLE - can receive money from monetisation related features KICK_BAN_MEMBERS: BitFlag(33), // can kick or ban guild or group DM members in the guilds/groups that they have KICK_MEMBERS, or BAN_MEMBERS SELF_LEAVE_GROUPS: BitFlag(34), // can leave the guilds or group DMs that they joined on their own (one can always leave a guild or group DMs they have been force-added) PRESENCE: BitFlag(35), // inverts the presence confidentiality default (OPERATOR's presence is not routed by default, others' are) for a given user - UNUSED_22: BitFlag(36), - UNUSED_23: BitFlag(37), - UNUSED_24: BitFlag(38), - UNUSED_25: BitFlag(39), - UNUSED_26: BitFlag(40), - UNUSED_27: BitFlag(41), + UNUSED_22: BitFlag(36), //PREVIOUS IDENTITY: SELF_ADD_DISCOVERABLE - can mark discoverable guilds that they have permissions to mark as discoverable + UNUSED_23: BitFlag(37), //PREVIOUS IDENTITY: MANAGE_GUILD_DIRECTORY - can change anything in the primary guild directory + UNUSED_24: BitFlag(38), //PREVIOUS IDENTITY: POGGERS - can send confetti, screenshake, random user mention (@someone) + UNUSED_25: BitFlag(39), //PREVIOUS IDENTITY: USE_ACHIEVEMENTS - can use achievements and cheers + UNUSED_26: BitFlag(40), //PREVIOUS IDENTITY: INITIATE_INTERACTIONS - can initiate interactions + UNUSED_27: BitFlag(41), //PREVIOUS IDENTITY: RESPOND_TO_INTERACTIONS - can respond to interactions SEND_BACKDATED_EVENTS: BitFlag(42), // can send backdated events USE_MASS_INVITES: BitFlag(43), // added per @xnacly's request - can accept mass invites - UNUSED_28: BitFlag(44), - UNUSED_29: BitFlag(45), - UNUSED_30: BitFlag(46), - UNUSED_31: BitFlag(47), + UNUSED_28: BitFlag(44), //PREVIOUS IDENTITY: ACCEPT_INVITES - added per @xnacly's request - can accept user-specific invites and DM requests + UNUSED_29: BitFlag(45), //PREVIOUS IDENTITY: SELF_EDIT_FLAGS - can modify own flags + UNUSED_30: BitFlag(46), //PREVIOUS IDENTITY: EDIT_FLAGS - can set others' flags + UNUSED_31: BitFlag(47), //PREVIOUS IDENTITY: MANAGE_GROUPS - can manage others' groups VIEW_SERVER_STATS: BitFlag(48), // added per @chrischrome's request - can view server stats) RESEND_VERIFICATION_EMAIL: BitFlag(49), // can resend verification emails (/auth/verify/resend) CREATE_REGISTRATION_TOKENS: BitFlag(50), // can create registration tokens (/auth/generate-registration-tokens)