Skip to content

Commit

Permalink
feat(Guild): add join raid and mention raid protection
Browse files Browse the repository at this point in the history
  • Loading branch information
advaith1 committed Mar 23, 2023
1 parent 08cbcd7 commit abdeb91
Show file tree
Hide file tree
Showing 16 changed files with 379 additions and 273 deletions.
5 changes: 5 additions & 0 deletions deno/payloads/v10/auditLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,11 @@ export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_chann
*/
export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>;

/**
* Returned when a guild's safety_alerts_channel_id is changed
*/
export type APIAuditLogChangeKeySafetyAlertsChannelId = AuditLogChangeData<'safety_alerts_channel_id', string>;

/**
* Returned when a guild's mfa_level is changed
*/
Expand Down
6 changes: 6 additions & 0 deletions deno/payloads/v10/autoModeration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ export interface APIAutoModerationRuleTriggerMetadata {
* Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam}
*/
mention_total_limit?: number;
/**
* Whether to automatically detect mention raids
*
* Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam}
*/
mention_raid_protection_enabled?: boolean;
}

/**
Expand Down
8 changes: 8 additions & 0 deletions deno/payloads/v10/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ export interface APIGuild extends APIPartialGuild {
* The type of Student Hub the guild is
*/
hub_type: GuildHubType | null;
/**
* The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
*/
safety_alerts_channel_id: Snowflake | null;
}

/**
Expand Down Expand Up @@ -486,6 +490,10 @@ export enum GuildFeature {
* Guild has access to create private threads
*/
PrivateThreads = 'PRIVATE_THREADS',
/**
* Guild has enabled alerts for join raids in the configured safety alerts channel
*/
RaidAlertsEnabled = 'RAID_ALERTS_ENABLED',
RelayEnabled = 'RELAY_ENABLED',
/**
* Guild is able to set role icons
Expand Down
5 changes: 5 additions & 0 deletions deno/payloads/v9/auditLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,11 @@ export type APIAuditLogChangeKeyRulesChannelId = AuditLogChangeData<'rules_chann
*/
export type APIAuditLogChangeKeyPublicUpdatesChannelId = AuditLogChangeData<'public_updates_channel_id', string>;

/**
* Returned when a guild's safety_alerts_channel_id is changed
*/
export type APIAuditLogChangeKeySafetyAlertsChannelId = AuditLogChangeData<'safety_alerts_channel_id', string>;

/**
* Returned when a guild's mfa_level is changed
*/
Expand Down
6 changes: 6 additions & 0 deletions deno/payloads/v9/autoModeration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ export interface APIAutoModerationRuleTriggerMetadata {
* Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam}
*/
mention_total_limit?: number;
/**
* Whether to automatically detect mention raids
*
* Associated trigger type: {@link AutoModerationRuleTriggerType.MentionSpam}
*/
mention_raid_protection_enabled?: boolean;
}

/**
Expand Down
8 changes: 8 additions & 0 deletions deno/payloads/v9/guild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ export interface APIGuild extends APIPartialGuild {
* The type of Student Hub the guild is
*/
hub_type: GuildHubType | null;
/**
* The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
*/
safety_alerts_channel_id: Snowflake | null;
}

/**
Expand Down Expand Up @@ -478,6 +482,10 @@ export enum GuildFeature {
* Guild has access to create private threads
*/
PrivateThreads = 'PRIVATE_THREADS',
/**
* Guild has enabled alerts for join raids in the configured safety alerts channel
*/
RaidAlertsEnabled = 'RAID_ALERTS_ENABLED',
RelayEnabled = 'RELAY_ENABLED',
/**
* Guild is able to set role icons
Expand Down
Loading

0 comments on commit abdeb91

Please sign in to comment.