Skip to content

Commit

Permalink
feat: add various new flags (#733)
Browse files Browse the repository at this point in the history
  • Loading branch information
advaith1 committed Mar 22, 2023
1 parent 2a78a51 commit 4723d29
Show file tree
Hide file tree
Showing 16 changed files with 444 additions and 24 deletions.
18 changes: 13 additions & 5 deletions deno/payloads/v10/application.ts
Expand Up @@ -123,19 +123,27 @@ export interface APIApplicationInstallParams {
*/
export enum ApplicationFlags {
/**
* @unstable
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
EmbeddedReleased = 1 << 1,
/**
* @unstable
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
ManagedEmoji = 1 << 2,
/**
* @unstable
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
EmbeddedIAP = 1 << 3,
/**
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
GroupDMCreate = 1 << 4,
/**
* @unstable
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
ApplicationAutoModerationRuleCreateBadge = 1 << 6,
/**
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
RPCHasConnected = 1 << 11,
/**
Expand Down Expand Up @@ -174,7 +182,7 @@ export enum ApplicationFlags {
*/
GatewayMessageContentLimited = 1 << 19,
/**
* @unstable
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
EmbeddedFirstParty = 1 << 20,
/**
Expand Down
51 changes: 50 additions & 1 deletion deno/payloads/v10/channel.ts
Expand Up @@ -798,10 +798,18 @@ export enum MessageFlags {
* This message failed to mention some roles and add their members to the thread
*/
FailedToMentionSomeRolesInThread = 1 << 8,
/**
* @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
ShouldShowLinkNotDiscordWarning = 1 << 10,
/**
* This message will not trigger push and desktop notifications
*/
SuppressNotifications = 1 << 12,
/**
* @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
IsVoiceMessage = 1 << 13,
}

/**
Expand Down Expand Up @@ -970,7 +978,24 @@ export interface APIThreadMember {
member?: APIGuildMember;
}

export enum ThreadMemberFlags {}
export enum ThreadMemberFlags {
/**
* @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
HasInteracted = 1 << 0,
/**
* @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
AllMessages = 1 << 1,
/**
* @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
OnlyMentions = 1 << 2,
/**
* @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
NoMessages = 1 << 3,
}

export interface APIThreadList {
/**
Expand Down Expand Up @@ -1661,15 +1686,39 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
* https://discord.com/developers/docs/resources/channel#channel-object-channel-flags
*/
export enum ChannelFlags {
/**
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
GuildFeedRemoved = 1 << 0,
/**
* This thread is pinned to the top of its parent forum channel
*/
Pinned = 1 << 1,
/**
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
ActiveChannelsRemoved = 1 << 2,
/**
* Whether a tag is required to be specified when creating a thread in a forum channel.
* Tags are specified in the `applied_tags` field
*/
RequireTag = 1 << 4,
/**
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
IsSpam = 1 << 5,
/**
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
IsGuildResourceChannel = 1 << 7,
/**
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
ClydeAI = 1 << 8,
/**
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
IsScheduledForDeletion = 1 << 9,
}

/**
Expand Down
16 changes: 16 additions & 0 deletions deno/payloads/v10/guild.ts
Expand Up @@ -675,6 +675,22 @@ export enum GuildMemberFlags {
* Member has started onboarding
*/
StartedOnboarding = 1 << 3,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
StartedHomeActions = 1 << 5,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
CompletedHomeActions = 1 << 6,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
AutomodQuarantinedUsernameOrGuildNickname = 1 << 7,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
AutomodQuarantinedBio = 1 << 8,
}

/**
Expand Down
32 changes: 32 additions & 0 deletions deno/payloads/v10/user.ts
Expand Up @@ -101,6 +101,14 @@ export enum UserFlags {
* Bug Hunter Level 1
*/
BugHunterLevel1 = 1 << 3,
/**
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
MFASMS = 1 << 4,
/**
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
PremiumPromoDismissed = 1 << 5,
/**
* House Bravery Member
*/
Expand All @@ -121,6 +129,10 @@ export enum UserFlags {
* User is a [team](https://discord.com/developers/docs/topics/teams)
*/
TeamPseudoUser = 1 << 10,
/**
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
HasUnreadUrgentMessages = 1 << 13,
/**
* Bug Hunter Level 2
*/
Expand All @@ -147,6 +159,10 @@ export enum UserFlags {
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
Spammer = 1 << 20,
/**
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
DisablePremium = 1 << 21,
/**
* User is an [Active Developer](https://support-dev.discord.com/hc/articles/10113997751447)
*/
Expand All @@ -161,6 +177,22 @@ export enum UserFlags {
* This value would be 1 << 44, but bit shifting above 1 << 30 requires bigints
*/
Quarantined = 17592186044416,
/**
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*
* @privateRemarks
*
* This value would be 1 << 50, but bit shifting above 1 << 30 requires bigints
*/
Collaborator = 1125899906842624,
/**
* @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*
* @privateRemarks
*
* This value would be 1 << 51, but bit shifting above 1 << 30 requires bigints
*/
RestrictedCollaborator = 2251799813685248,
}

/**
Expand Down
18 changes: 13 additions & 5 deletions deno/payloads/v9/application.ts
Expand Up @@ -123,19 +123,27 @@ export interface APIApplicationInstallParams {
*/
export enum ApplicationFlags {
/**
* @unstable
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
EmbeddedReleased = 1 << 1,
/**
* @unstable
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
ManagedEmoji = 1 << 2,
/**
* @unstable
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
EmbeddedIAP = 1 << 3,
/**
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
GroupDMCreate = 1 << 4,
/**
* @unstable
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
ApplicationAutoModerationRuleCreateBadge = 1 << 6,
/**
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
RPCHasConnected = 1 << 11,
/**
Expand Down Expand Up @@ -174,7 +182,7 @@ export enum ApplicationFlags {
*/
GatewayMessageContentLimited = 1 << 19,
/**
* @unstable
* @unstable This application flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
EmbeddedFirstParty = 1 << 20,
/**
Expand Down
51 changes: 50 additions & 1 deletion deno/payloads/v9/channel.ts
Expand Up @@ -784,10 +784,18 @@ export enum MessageFlags {
* This message failed to mention some roles and add their members to the thread
*/
FailedToMentionSomeRolesInThread = 1 << 8,
/**
* @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
ShouldShowLinkNotDiscordWarning = 1 << 10,
/**
* This message will not trigger push and desktop notifications
*/
SuppressNotifications = 1 << 12,
/**
* @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
IsVoiceMessage = 1 << 13,
}

/**
Expand Down Expand Up @@ -934,7 +942,24 @@ export interface APIThreadMember {
member?: APIGuildMember;
}

export enum ThreadMemberFlags {}
export enum ThreadMemberFlags {
/**
* @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
HasInteracted = 1 << 0,
/**
* @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
AllMessages = 1 << 1,
/**
* @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
OnlyMentions = 1 << 2,
/**
* @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
NoMessages = 1 << 3,
}

export interface APIThreadList {
/**
Expand Down Expand Up @@ -1629,15 +1654,39 @@ export interface APITextInputComponent extends APIBaseComponent<ComponentType.Te
* https://discord.com/developers/docs/resources/channel#channel-object-channel-flags
*/
export enum ChannelFlags {
/**
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
GuildFeedRemoved = 1 << 0,
/**
* This thread is pinned to the top of its parent forum channel
*/
Pinned = 1 << 1,
/**
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
ActiveChannelsRemoved = 1 << 2,
/**
* Whether a tag is required to be specified when creating a thread in a forum channel.
* Tags are specified in the `applied_tags` field
*/
RequireTag = 1 << 4,
/**
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
IsSpam = 1 << 5,
/**
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
IsGuildResourceChannel = 1 << 7,
/**
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
ClydeAI = 1 << 8,
/**
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
IsScheduledForDeletion = 1 << 9,
}

/**
Expand Down
16 changes: 16 additions & 0 deletions deno/payloads/v9/guild.ts
Expand Up @@ -667,6 +667,22 @@ export enum GuildMemberFlags {
* Member has started onboarding
*/
StartedOnboarding = 1 << 3,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
StartedHomeActions = 1 << 5,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
CompletedHomeActions = 1 << 6,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
AutomodQuarantinedUsernameOrGuildNickname = 1 << 7,
/**
* @unstable This guild member flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
AutomodQuarantinedBio = 1 << 8,
}

/**
Expand Down

0 comments on commit 4723d29

Please sign in to comment.