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.
This commit is contained in:
ald_productions committed 2026-07-04 10:15:20 -07:00
1 parent 11fa9d2180
commit d5f49f84c3
5 files changed
+77 -74

No files matched your search

+1 -1
View File
@@ -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),
/**
+31 -31
View File
@@ -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)