parent
288be9b0a1
commit
7f565e1848
@ -75,6 +75,7 @@ class AutoModerationRuleManager extends CachedManager {
|
||||
* @typedef {Object} AutoModerationActionMetadataOptions
|
||||
* @property {GuildTextChannelResolvable|ThreadChannel} [channel] The channel to which content will be logged
|
||||
* @property {number} [durationSeconds] The timeout duration in seconds
|
||||
* @property {string} [customMessage] The custom message that is shown whenever a message is blocked
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -133,6 +134,7 @@ class AutoModerationRuleManager extends CachedManager {
|
||||
metadata: {
|
||||
duration_seconds: action.metadata?.durationSeconds,
|
||||
channel_id: action.metadata?.channel && this.guild.channels.resolveId(action.metadata.channel),
|
||||
custom_message: action.metadata?.customMessage,
|
||||
},
|
||||
})),
|
||||
enabled,
|
||||
@ -195,6 +197,7 @@ class AutoModerationRuleManager extends CachedManager {
|
||||
metadata: {
|
||||
duration_seconds: action.metadata?.durationSeconds,
|
||||
channel_id: action.metadata?.channel && this.guild.channels.resolveId(action.metadata.channel),
|
||||
custom_message: action.metadata?.customMessage,
|
||||
},
|
||||
})),
|
||||
enabled,
|
||||
|
@ -103,6 +103,7 @@ class AutoModerationRule extends Base {
|
||||
* @typedef {Object} AutoModerationActionMetadata
|
||||
* @property {?Snowflake} channelId The id of the channel to which content will be logged
|
||||
* @property {?number} durationSeconds The timeout duration in seconds
|
||||
* @property {?string} customMessage The custom message that is shown whenever a message is blocked
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -114,6 +115,7 @@ class AutoModerationRule extends Base {
|
||||
metadata: {
|
||||
durationSeconds: action.metadata.duration_seconds ?? null,
|
||||
channelId: action.metadata.channel_id ?? null,
|
||||
customMessage: action.metadata.custom_message ?? null,
|
||||
},
|
||||
}));
|
||||
}
|
||||
|
1
typings/index.d.ts
vendored
1
typings/index.d.ts
vendored
@ -5383,6 +5383,7 @@ export interface AutoModerationAction {
|
||||
export interface AutoModerationActionMetadata {
|
||||
channelId: Snowflake | null;
|
||||
durationSeconds: number | null;
|
||||
customMessage: string | null;
|
||||
}
|
||||
|
||||
export interface AutoModerationTriggerMetadata {
|
||||
|
1
typings/rawDataTypes.d.ts
vendored
1
typings/rawDataTypes.d.ts
vendored
@ -248,6 +248,7 @@ export interface APIAutoModerationAction {
|
||||
export interface APIAutoModerationActionMetadata {
|
||||
channel_id?: Snowflake;
|
||||
duration_seconds?: number;
|
||||
custom_message?: string;
|
||||
}
|
||||
|
||||
export interface APIAutoModerationRule {
|
||||
|
Loading…
Reference in New Issue
Block a user