feat: Update User Flags & Application Flags

This commit is contained in:
Elysia 2023-04-22 13:00:50 +07:00
parent 8f43b9028e
commit a7a9add421
3 changed files with 39 additions and 4 deletions

View File

@ -49,8 +49,10 @@ class ApplicationFlags extends BitField {}
ApplicationFlags.FLAGS = { ApplicationFlags.FLAGS = {
EMBEDDED_RELEASED: 1 << 1, EMBEDDED_RELEASED: 1 << 1,
MANAGED_EMOJI: 1 << 2, MANAGED_EMOJI: 1 << 2,
EMBEDDED_IAP: 1 << 3,
GROUP_DM_CREATE: 1 << 4, GROUP_DM_CREATE: 1 << 4,
RPC_PRIVATE_BETA: 1 << 5, RPC_PRIVATE_BETA: 1 << 5,
APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE: 1 << 6,
ALLOW_ASSETS: 1 << 8, ALLOW_ASSETS: 1 << 8,
ALLOW_ACTIVITY_ACTION_SPECTATE: 1 << 9, ALLOW_ACTIVITY_ACTION_SPECTATE: 1 << 9,
ALLOW_ACTIVITY_ACTION_JOIN_REQUEST: 1 << 10, ALLOW_ACTIVITY_ACTION_JOIN_REQUEST: 1 << 10,

View File

@ -97,8 +97,8 @@ UserFlags.FLAGS = {
DISABLED: Math.pow(2, 41), // [Undocumented] User is currently temporarily or permanently disabled. DISABLED: Math.pow(2, 41), // [Undocumented] User is currently temporarily or permanently disabled.
VERIFIED_EMAIL: Math.pow(2, 43), // [Undocumented] User has a verified email on their account. VERIFIED_EMAIL: Math.pow(2, 43), // [Undocumented] User has a verified email on their account.
QUARANTINED: Math.pow(2, 44), // [Undocumented] User is quarantined. QUARANTINED: Math.pow(2, 44), // [Undocumented] User is quarantined.
COLLABORATOR: 1 << 50, // [Undocumented] User is a collaborator and has staff permissions. COLLABORATOR: Math.pow(2, 50), // [Undocumented] User is a collaborator and has staff permissions.
RESTRICTED_COLLABORATOR: 1 << 51, // [Undocumented] User is a restricted collaborator and has staff permissions. RESTRICTED_COLLABORATOR: Math.pow(2, 51), // [Undocumented] User is a restricted collaborator and has staff permissions.
}; };
module.exports = UserFlags; module.exports = UserFlags;

37
typings/index.d.ts vendored
View File

@ -5355,6 +5355,16 @@ export type ApplicationCommandPermissionType = keyof typeof ApplicationCommandPe
export type ApplicationCommandResolvable = ApplicationCommand | Snowflake; export type ApplicationCommandResolvable = ApplicationCommand | Snowflake;
export type ApplicationFlagsString = export type ApplicationFlagsString =
| 'EMBEDDED_RELEASED'
| 'MANAGED_EMOJI'
| 'EMBEDDED_IAP'
| 'GROUP_DM_CREATE'
| 'RPC_PRIVATE_BETA'
| 'APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE'
| 'ALLOW_ASSETS'
| 'ALLOW_ACTIVITY_ACTION_SPECTATE'
| 'ALLOW_ACTIVITY_ACTION_JOIN_REQUEST'
| 'RPC_HAS_CONNECTED'
| 'GATEWAY_PRESENCE' | 'GATEWAY_PRESENCE'
| 'GATEWAY_PRESENCE_LIMITED' | 'GATEWAY_PRESENCE_LIMITED'
| 'GATEWAY_GUILD_MEMBERS' | 'GATEWAY_GUILD_MEMBERS'
@ -5364,7 +5374,8 @@ export type ApplicationFlagsString =
| 'GATEWAY_MESSAGE_CONTENT' | 'GATEWAY_MESSAGE_CONTENT'
| 'GATEWAY_MESSAGE_CONTENT_LIMITED' | 'GATEWAY_MESSAGE_CONTENT_LIMITED'
| 'EMBEDDED_FIRST_PARTY' | 'EMBEDDED_FIRST_PARTY'
| 'APPLICATION_COMMAND_BADGE'; | 'APPLICATION_COMMAND_BADGE'
| 'ACTIVE';
export interface ApplicationRoleConnectionMetadataEditOptions { export interface ApplicationRoleConnectionMetadataEditOptions {
name: string; name: string;
@ -7373,16 +7384,38 @@ export type UserFlagsString =
| 'PARTNERED_SERVER_OWNER' | 'PARTNERED_SERVER_OWNER'
| 'HYPESQUAD_EVENTS' | 'HYPESQUAD_EVENTS'
| 'BUGHUNTER_LEVEL_1' | 'BUGHUNTER_LEVEL_1'
| 'MFA_SMS'
| 'PREMIUM_PROMO_DISMISSED'
| 'HOUSE_BRAVERY' | 'HOUSE_BRAVERY'
| 'HOUSE_BRILLIANCE' | 'HOUSE_BRILLIANCE'
| 'HOUSE_BALANCE' | 'HOUSE_BALANCE'
| 'EARLY_SUPPORTER' | 'EARLY_SUPPORTER'
| 'TEAM_USER' | 'TEAM_USER'
| 'INTERNAL_APPLICATION'
| 'SYSTEM'
| 'HAS_UNREAD_URGENT_MESSAGES'
| 'BUGHUNTER_LEVEL_2' | 'BUGHUNTER_LEVEL_2'
| 'UNDERAGE_DELETED'
| 'VERIFIED_BOT' | 'VERIFIED_BOT'
| 'EARLY_VERIFIED_BOT_DEVELOPER' | 'EARLY_VERIFIED_BOT_DEVELOPER'
| 'DISCORD_CERTIFIED_MODERATOR' | 'DISCORD_CERTIFIED_MODERATOR'
| 'BOT_HTTP_INTERACTIONS'; | 'BOT_HTTP_INTERACTIONS'
| 'SPAMMER'
| 'DISABLE_PREMIUM'
| 'ACTIVE_DEVELOPER'
| 'HIGH_GLOBAL_RATE_LIMIT'
| 'DELETED'
| 'DISABLED_SUSPICIOUS_ACTIVITY'
| 'SELF_DELETED'
| 'PREMIUM_DISCRIMINATOR'
| 'USED_DESKTOP_CLIENT'
| 'USED_WEB_CLIENT'
| 'USED_MOBILE_CLIENT'
| 'DISABLED'
| 'VERIFIED_EMAIL'
| 'QUARANTINED'
| 'COLLABORATOR'
| 'RESTRICTED_COLLABORATOR';
export type UserMention = `<@${Snowflake}>`; export type UserMention = `<@${Snowflake}>`;