mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
feat(bot,types): add customMessage to AutoModerationActionMetadata (#2887)
* feat(bot,types): add `customMessage` to `AutoModerationActionMetadata` Closes: https://github.com/discordeno/discordeno/issues/2881 * docs(types): add clarification for the supported action type
This commit is contained in:
@@ -19,6 +19,7 @@ export function transformAutoModerationActionExecution(bot: Bot, payload: Discor
|
||||
type: payload.action.type,
|
||||
metadata: {
|
||||
durationSeconds: payload.action.metadata.duration_seconds,
|
||||
customMessage: payload.action.metadata.custom_message,
|
||||
channelId: payload.action.metadata.channel_id ? bot.transformers.snowflake(payload.action.metadata.channel_id) : undefined,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -27,6 +27,7 @@ export function transformAutoModerationRule(bot: Bot, payload: DiscordAutoModera
|
||||
metadata: action.metadata
|
||||
? {
|
||||
channelId: action.metadata.channel_id ? bot.transformers.snowflake(action.metadata.channel_id) : undefined,
|
||||
customMessage: action.metadata.custom_message,
|
||||
durationSeconds: action.metadata.duration_seconds,
|
||||
}
|
||||
: undefined,
|
||||
|
||||
@@ -1443,6 +1443,8 @@ export enum AutoModerationActionType {
|
||||
export interface DiscordAutoModerationActionMetadata {
|
||||
/** The id of channel to which user content should be logged. Only in ActionType.SendAlertMessage */
|
||||
channel_id?: string
|
||||
/** Additional explanation that will be shown to members whenever their message is blocked. Maximum of 150 characters. Only supported for AutoModerationActionType.BlockMessage */
|
||||
custom_message?: string
|
||||
/** Timeout duration in seconds maximum of 2419200 seconds (4 weeks). Only supported for TriggerType.Keyword && Only in ActionType.Timeout */
|
||||
duration_seconds?: number
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user