diff --git a/index.d.ts b/index.d.ts index efec0c15..796000f8 100644 --- a/index.d.ts +++ b/index.d.ts @@ -317,6 +317,8 @@ declare namespace Dysnomia { keyword_filter: string[]; /** valid for MENTION_SPAM */ mention_total_limit: number; + /** valid for MENTION_SPAM */ + mention_raid_protection_enabled: boolean; /** valid for KEYWORD_PRESET */ presets: AutoModerationKeywordPresetType[]; /** valid for KEYWORD */ @@ -599,6 +601,7 @@ declare namespace Dysnomia { premiumTier: PremiumTier; publicUpdatesChannelID: string | null; rulesChannelID: string | null; + safetyAlertsChannelID: string | null; splash: string | null; stickers?: Sticker[]; systemChannelFlags: SystemChannelFlags; @@ -1010,6 +1013,7 @@ declare namespace Dysnomia { premiumProgressBarEnabled?: boolean; publicUpdatesChannelID?: string; rulesChannelID?: string; + safetyAlertsChannelID?: string; splash?: string; systemChannelFlags?: number; systemChannelID?: string; @@ -1991,6 +1995,7 @@ declare namespace Dysnomia { "NEWS", "PARTNERED", "PREVIEW_ENABLED", + "RAID_ALERTS_DISABLED", "ROLE_ICONS", "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE", "ROLE_SUBSCRIPTIONS_ENABLED", @@ -2863,6 +2868,7 @@ declare namespace Dysnomia { publicUpdatesChannelID: string | null; roles: Collection; rulesChannelID: string | null; + safetyAlertsChannelID: string | null; shard: Shard; splash: string | null; splashURL: string | null; diff --git a/lib/Client.js b/lib/Client.js index c65a99b7..744b582a 100644 --- a/lib/Client.js +++ b/lib/Client.js @@ -1387,6 +1387,7 @@ class Client extends EventEmitter { * @arg {Boolean} [options.premiumProgressBarEnabled] If the boost progress bar is enabled * @arg {String} [options.publicUpdatesChannelID] The id of the channel where admins and moderators of "COMMUNITY" guilds receive notices from Discord * @arg {String} [options.rulesChannelID] The id of the channel where "COMMUNITY" guilds display rules and/or guidelines + * @arg {String} [options.safetyAlertsChannelID] The ID of the channel where safety alerts from Discord are received * @arg {String} [options.splash] The guild splash image as a base64 data URI (VIP only). Note: base64 strings alone are not base64 data URI strings * @arg {Number} [options.systemChannelFlags] The flags for the system channel * @arg {String} [options.systemChannelID] The ID of the system channel @@ -1415,6 +1416,7 @@ class Client extends EventEmitter { discovery_splash: options.discoverySplash, features: options.features, premium_progress_bar_enabled: options.premiumProgressBarEnabled, + safety_alerts_channel_id: options.safetyAlertsChannelID, reason: reason }).then((guild) => new Guild(guild, this)); } diff --git a/lib/Constants.js b/lib/Constants.js index 92cfbbf8..101d28c9 100644 --- a/lib/Constants.js +++ b/lib/Constants.js @@ -263,6 +263,7 @@ module.exports.GuildFeatures = [ "NEWS", "PARTNERED", "PREVIEW_ENABLED", + "RAID_ALERTS_DISABLED", "ROLE_ICONS", "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE", "ROLE_SUBSCRIPTIONS_ENABLED", diff --git a/lib/gateway/Shard.js b/lib/gateway/Shard.js index f9eaeb6c..91735413 100644 --- a/lib/gateway/Shard.js +++ b/lib/gateway/Shard.js @@ -1227,6 +1227,7 @@ class Shard extends EventEmitter { premiumTier: guild.premiumTier, publicUpdatesChannelID: guild.publicUpdatesChannelID, rulesChannelID: guild.rulesChannelID, + safetyAlertsChannelID: guild.safetyAlertsChannelID, splash: guild.splash, stickers: guild.stickers, systemChannelFlags: guild.systemChannelFlags, @@ -1265,6 +1266,7 @@ class Shard extends EventEmitter { * @prop {Number} oldGuild.premiumTier Nitro boost level of the guild * @prop {String?} oldGuild.publicUpdatesChannelID ID of the guild's updates channel if the guild has "COMMUNITY" features * @prop {String?} oldGuild.rulesChannelID The channel where "COMMUNITY" guilds display rules and/or guidelines + * @prop {String?} oldGuild.safetyAlertsChannelID The ID of the channel where safety alerts from Discord are received * @prop {String?} oldGuild.splash The hash of the guild splash image, or null if no splash (VIP only) * @prop {Array?} stickers An array of guild sticker objects * @prop {Number} oldGuild.systemChannelFlags the flags for the system channel diff --git a/lib/structures/Guild.js b/lib/structures/Guild.js index a163ef68..596e129b 100644 --- a/lib/structures/Guild.js +++ b/lib/structures/Guild.js @@ -54,6 +54,7 @@ const ThreadChannel = require("./ThreadChannel"); * @prop {String?} publicUpdatesChannelID ID of the guild's updates channel if the guild has "COMMUNITY" features * @prop {Collection} roles Collection of Roles in the guild * @prop {String?} rulesChannelID The channel where "COMMUNITY" guilds display rules and/or guidelines +* @prop {String?} safetyAlertsChannelID The ID of the channel where safety alerts from Discord are received * @prop {Shard} shard The Shard that owns the guild * @prop {String?} splash The hash of the guild splash image, or null if no splash (VIP only) * @prop {String?} splashURL The URL of the guild's splash image @@ -294,6 +295,9 @@ class Guild extends Base { if(data.nsfw_level !== undefined) { this.nsfwLevel = data.nsfw_level; } + if(data.safety_alerts_channel_id !== undefined) { + this.safetyAlertsChannelID = data.safety_alerts_channel_id; + } } get bannerURL() {