feat: v13 safety alerts channel and mention raid protection

#9073 djs
This commit is contained in:
Elysia
2023-02-12 15:30:49 +07:00
parent 779fc7a5f4
commit f28ea5c031
4 changed files with 63 additions and 0 deletions

9
typings/index.d.ts vendored
View File

@@ -1363,6 +1363,8 @@ export class Guild extends AnonymousGuild {
public roles: RoleManager;
public readonly rulesChannel: TextChannel | null;
public rulesChannelId: Snowflake | null;
public readonly safetyAlertsChannel: TextChannel | null;
public safetyAlertsChannelId: Snowflake | null;
public scheduledEvents: GuildScheduledEventManager;
public readonly shard: WebSocketShard;
public shardId: number;
@@ -1426,6 +1428,7 @@ export class Guild extends AnonymousGuild {
/** @deprecated Use {@link RoleManager.setPositions} instead */
public setRolePositions(rolePositions: readonly RolePosition[]): 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>;
@@ -5149,6 +5152,10 @@ export class AutoModerationRule extends Base {
public setRegexPatterns(regexPatterns: string[], reason?: string): Promise<AutoModerationRule>;
public setPresets(presets: AutoModerationRuleKeywordPresetType[], reason?: string): Promise<AutoModerationRule>;
public setAllowList(allowList: string[], reason?: string): Promise<AutoModerationRule>;
public setMentionRaidProtectionEnabled(
mentionRaidProtectionEnabled: boolean,
reason?: string,
): Promise<AutoModerationRule>;
public setMentionTotalLimit(mentionTotalLimit: number, reason?: string): Promise<AutoModerationRule>;
public setActions(actions: AutoModerationActionOptions[], reason?: string): Promise<AutoModerationRule>;
public setEnabled(enabled?: boolean, reason?: string): Promise<AutoModerationRule>;
@@ -5229,6 +5236,7 @@ export interface AutoModerationTriggerMetadata {
regexPatterns: string[];
presets: (AutoModerationRuleKeywordPresetType | AutoModerationRuleKeywordPresetTypes)[];
allowList: string[];
mentionRaidProtectionEnabled: boolean;
mentionTotalLimit: number | null;
}
@@ -6120,6 +6128,7 @@ export interface GuildEditData {
rulesChannel?: TextChannelResolvable | null;
publicUpdatesChannel?: TextChannelResolvable | null;
preferredLocale?: string | null;
safetyAlertsChannel?: TextChannelResolvable | null;
premiumProgressBarEnabled?: boolean;
description?: string | null;
features?: GuildFeatures[];