Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
panley01 committed Jan 25, 2023
2 parents 8c86877 + 31ca234 commit deb4f5e
Show file tree
Hide file tree
Showing 8 changed files with 204 additions and 4 deletions.
26 changes: 25 additions & 1 deletion deno/gateway/v10.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import type {
InviteTargetType,
PresenceUpdateStatus,
AutoModerationRuleTriggerType,
APIAuditLogEntry,
} from '../payloads/v10/mod.ts';
import type { Nullable } from '../utils/internals.ts';

Expand Down Expand Up @@ -179,7 +180,11 @@ export enum GatewayCloseCodes {
export enum GatewayIntentBits {
Guilds = 1 << 0,
GuildMembers = 1 << 1,
GuildBans = 1 << 2,
GuildModeration = 1 << 2,
/**
* @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration}
*/
GuildBans = GuildModeration,
GuildEmojisAndStickers = 1 << 3,
GuildIntegrations = 1 << 4,
GuildWebhooks = 1 << 5,
Expand Down Expand Up @@ -262,6 +267,7 @@ export enum GatewayDispatchEvents {
AutoModerationRuleUpdate = 'AUTO_MODERATION_RULE_UPDATE',
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE',
}

export type GatewaySendPayload =
Expand Down Expand Up @@ -1691,6 +1697,24 @@ export interface GatewayWebhooksUpdateDispatchData {
channel_id: Snowflake;
}

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export type GatewayGuildAuditLogEntryCreateDispatch = DataPayload<
GatewayDispatchEvents.GuildAuditLogEntryCreate,
GatewayGuildAuditLogEntryCreateDispatchData
>;

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLogEntry {
/**
* ID of the guild
*/
guild_id: Snowflake;
}

// #endregion Dispatch Payloads

// #region Sendable Payloads
Expand Down
26 changes: 25 additions & 1 deletion deno/gateway/v9.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import type {
InviteTargetType,
PresenceUpdateStatus,
AutoModerationRuleTriggerType,
APIAuditLogEntry,
} from '../payloads/v9/mod.ts';
import type { Nullable } from '../utils/internals.ts';

Expand Down Expand Up @@ -179,7 +180,11 @@ export enum GatewayCloseCodes {
export enum GatewayIntentBits {
Guilds = 1 << 0,
GuildMembers = 1 << 1,
GuildBans = 1 << 2,
GuildModeration = 1 << 2,
/**
* @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration}
*/
GuildBans = GuildModeration,
GuildEmojisAndStickers = 1 << 3,
GuildIntegrations = 1 << 4,
GuildWebhooks = 1 << 5,
Expand Down Expand Up @@ -261,6 +266,7 @@ export enum GatewayDispatchEvents {
AutoModerationRuleUpdate = 'AUTO_MODERATION_RULE_UPDATE',
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE',
}

export type GatewaySendPayload =
Expand Down Expand Up @@ -1690,6 +1696,24 @@ export interface GatewayWebhooksUpdateDispatchData {
channel_id: Snowflake;
}

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export type GatewayGuildAuditLogEntryCreateDispatch = DataPayload<
GatewayDispatchEvents.GuildAuditLogEntryCreate,
GatewayGuildAuditLogEntryCreateDispatchData
>;

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLogEntry {
/**
* ID of the guild
*/
guild_id: Snowflake;
}

// #endregion Dispatch Payloads

// #region Sendable Payloads
Expand Down
26 changes: 26 additions & 0 deletions deno/payloads/v10/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,10 @@ export interface APIGuildMember {
* Whether the user is muted in voice channels
*/
mute: boolean;
/**
* Guild member flags represented as a bit set, defaults to `0`
*/
flags: GuildMemberFlags;
/**
* Whether the user has not yet passed the guild's Membership Screening requirements
*
Expand All @@ -651,6 +655,28 @@ export interface APIGuildMember {
communication_disabled_until?: string | null;
}

/**
* https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags
*/
export enum GuildMemberFlags {
/**
* Member has left and rejoined the guild
*/
DidRejoin = 1 << 0,
/**
* Member has completed onboarding
*/
CompletedOnboarding = 1 << 1,
/**
* Member bypasses guild verification requirements
*/
BypassesVerification = 1 << 2,
/**
* Member has started onboarding
*/
StartedOnboarding = 1 << 3,
}

/**
* https://discord.com/developers/docs/resources/guild#integration-object
*/
Expand Down
26 changes: 26 additions & 0 deletions deno/payloads/v9/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,10 @@ export interface APIGuildMember {
* Whether the user is muted in voice channels
*/
mute: boolean;
/**
* Guild member flags represented as a bit set, defaults to `0`
*/
flags: GuildMemberFlags;
/**
* Whether the user has not yet passed the guild's Membership Screening requirements
*
Expand All @@ -643,6 +647,28 @@ export interface APIGuildMember {
communication_disabled_until?: string | null;
}

/**
* https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags
*/
export enum GuildMemberFlags {
/**
* Member has left and rejoined the guild
*/
DidRejoin = 1 << 0,
/**
* Member has completed onboarding
*/
CompletedOnboarding = 1 << 1,
/**
* Member bypasses guild verification requirements
*/
BypassesVerification = 1 << 2,
/**
* Member has started onboarding
*/
StartedOnboarding = 1 << 3,
}

/**
* https://discord.com/developers/docs/resources/guild#integration-object
*/
Expand Down
26 changes: 25 additions & 1 deletion gateway/v10.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import type {
InviteTargetType,
PresenceUpdateStatus,
AutoModerationRuleTriggerType,
APIAuditLogEntry,
} from '../payloads/v10/index';
import type { Nullable } from '../utils/internals';

Expand Down Expand Up @@ -179,7 +180,11 @@ export enum GatewayCloseCodes {
export enum GatewayIntentBits {
Guilds = 1 << 0,
GuildMembers = 1 << 1,
GuildBans = 1 << 2,
GuildModeration = 1 << 2,
/**
* @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration}
*/
GuildBans = GuildModeration,
GuildEmojisAndStickers = 1 << 3,
GuildIntegrations = 1 << 4,
GuildWebhooks = 1 << 5,
Expand Down Expand Up @@ -262,6 +267,7 @@ export enum GatewayDispatchEvents {
AutoModerationRuleUpdate = 'AUTO_MODERATION_RULE_UPDATE',
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE',
}

export type GatewaySendPayload =
Expand Down Expand Up @@ -1691,6 +1697,24 @@ export interface GatewayWebhooksUpdateDispatchData {
channel_id: Snowflake;
}

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export type GatewayGuildAuditLogEntryCreateDispatch = DataPayload<
GatewayDispatchEvents.GuildAuditLogEntryCreate,
GatewayGuildAuditLogEntryCreateDispatchData
>;

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLogEntry {
/**
* ID of the guild
*/
guild_id: Snowflake;
}

// #endregion Dispatch Payloads

// #region Sendable Payloads
Expand Down
26 changes: 25 additions & 1 deletion gateway/v9.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import type {
InviteTargetType,
PresenceUpdateStatus,
AutoModerationRuleTriggerType,
APIAuditLogEntry,
} from '../payloads/v9/index';
import type { Nullable } from '../utils/internals';

Expand Down Expand Up @@ -179,7 +180,11 @@ export enum GatewayCloseCodes {
export enum GatewayIntentBits {
Guilds = 1 << 0,
GuildMembers = 1 << 1,
GuildBans = 1 << 2,
GuildModeration = 1 << 2,
/**
* @deprecated This is the old name for {@apilink GatewayIntentBits#GuildModeration}
*/
GuildBans = GuildModeration,
GuildEmojisAndStickers = 1 << 3,
GuildIntegrations = 1 << 4,
GuildWebhooks = 1 << 5,
Expand Down Expand Up @@ -261,6 +266,7 @@ export enum GatewayDispatchEvents {
AutoModerationRuleUpdate = 'AUTO_MODERATION_RULE_UPDATE',
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE',
}

export type GatewaySendPayload =
Expand Down Expand Up @@ -1690,6 +1696,24 @@ export interface GatewayWebhooksUpdateDispatchData {
channel_id: Snowflake;
}

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export type GatewayGuildAuditLogEntryCreateDispatch = DataPayload<
GatewayDispatchEvents.GuildAuditLogEntryCreate,
GatewayGuildAuditLogEntryCreateDispatchData
>;

/**
* https://discord.com/developers/docs/topics/gateway-events#guild-audit-log-entry-create
*/
export interface GatewayGuildAuditLogEntryCreateDispatchData extends APIAuditLogEntry {
/**
* ID of the guild
*/
guild_id: Snowflake;
}

// #endregion Dispatch Payloads

// #region Sendable Payloads
Expand Down
26 changes: 26 additions & 0 deletions payloads/v10/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,10 @@ export interface APIGuildMember {
* Whether the user is muted in voice channels
*/
mute: boolean;
/**
* Guild member flags represented as a bit set, defaults to `0`
*/
flags: GuildMemberFlags;
/**
* Whether the user has not yet passed the guild's Membership Screening requirements
*
Expand All @@ -651,6 +655,28 @@ export interface APIGuildMember {
communication_disabled_until?: string | null;
}

/**
* https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags
*/
export enum GuildMemberFlags {
/**
* Member has left and rejoined the guild
*/
DidRejoin = 1 << 0,
/**
* Member has completed onboarding
*/
CompletedOnboarding = 1 << 1,
/**
* Member bypasses guild verification requirements
*/
BypassesVerification = 1 << 2,
/**
* Member has started onboarding
*/
StartedOnboarding = 1 << 3,
}

/**
* https://discord.com/developers/docs/resources/guild#integration-object
*/
Expand Down
26 changes: 26 additions & 0 deletions payloads/v9/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,10 @@ export interface APIGuildMember {
* Whether the user is muted in voice channels
*/
mute: boolean;
/**
* Guild member flags represented as a bit set, defaults to `0`
*/
flags: GuildMemberFlags;
/**
* Whether the user has not yet passed the guild's Membership Screening requirements
*
Expand All @@ -643,6 +647,28 @@ export interface APIGuildMember {
communication_disabled_until?: string | null;
}

/**
* https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags
*/
export enum GuildMemberFlags {
/**
* Member has left and rejoined the guild
*/
DidRejoin = 1 << 0,
/**
* Member has completed onboarding
*/
CompletedOnboarding = 1 << 1,
/**
* Member bypasses guild verification requirements
*/
BypassesVerification = 1 << 2,
/**
* Member has started onboarding
*/
StartedOnboarding = 1 << 3,
}

/**
* https://discord.com/developers/docs/resources/guild#integration-object
*/
Expand Down

0 comments on commit deb4f5e

Please sign in to comment.