feat(Guild): safety alerts channel and mention raid protection (#8959)

* feat(Guild): add safety alerts channel and mention raid protection

* docs: add missing tag

* fix: keep other properties in triggerMetadata

* docs(Guild): update example usage

---------

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
This commit is contained in:
Almeida
2023-05-05 19:39:58 +01:00
committed by GitHub
parent d8d21cf370
commit 6b2c3fb9d0
4 changed files with 62 additions and 0 deletions

View File

@@ -378,6 +378,10 @@ export class AutoModerationRule extends Base {
public setPresets(presets: AutoModerationRuleKeywordPresetType[], reason?: string): Promise<AutoModerationRule>;
public setAllowList(allowList: string[], reason?: string): Promise<AutoModerationRule>;
public setMentionTotalLimit(mentionTotalLimit: number, reason?: string): Promise<AutoModerationRule>;
public setMentionRaidProtectionEnabled(
mentionRaidProtectionEnabled: boolean,
reason?: string,
): Promise<AutoModerationRule>;
public setActions(actions: AutoModerationActionOptions[], reason?: string): Promise<AutoModerationRule>;
public setEnabled(enabled?: boolean, reason?: string): Promise<AutoModerationRule>;
public setExemptRoles(
@@ -1324,6 +1328,8 @@ export class Guild extends AnonymousGuild {
public roles: RoleManager;
public get rulesChannel(): TextChannel | null;
public rulesChannelId: Snowflake | null;
public get safetyAlertsChannel(): TextChannel | null;
public safetyAlertsChannelId: Snowflake | null;
public scheduledEvents: GuildScheduledEventManager;
public get shard(): WebSocketShard;
public shardId: number;
@@ -1380,6 +1386,7 @@ export class Guild extends AnonymousGuild {
public setPreferredLocale(preferredLocale: Locale | null, reason?: string): Promise<Guild>;
public setPublicUpdatesChannel(publicUpdatesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;
public setRulesChannel(rulesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;
public setSafetyAlertsChannel(safetyAlertsChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;
public setSplash(splash: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>;
public setSystemChannel(systemChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;
public setSystemChannelFlags(systemChannelFlags: SystemChannelFlagsResolvable, reason?: string): Promise<Guild>;
@@ -4570,6 +4577,7 @@ export interface AutoModerationTriggerMetadata {
presets: AutoModerationRuleKeywordPresetType[];
allowList: string[];
mentionTotalLimit: number | null;
mentionRaidProtectionEnabled: boolean;
}
export type AwaitMessageComponentOptions<T extends CollectedMessageInteraction> = Omit<
@@ -5484,6 +5492,7 @@ export interface GuildEditOptions {
systemChannelFlags?: SystemChannelFlagsResolvable;
rulesChannel?: TextChannelResolvable | null;
publicUpdatesChannel?: TextChannelResolvable | null;
safetyAlertsChannel?: TextChannelResolvable | null;
preferredLocale?: Locale | null;
features?: `${GuildFeature}`[];
description?: string | null;