Fix user mention not working in Automod reply action
This commit is contained in:
parent
eb9cd080fd
commit
b541d5d087
1 changed files with 8 additions and 1 deletions
|
@ -4,6 +4,7 @@ import {
|
|||
convertDelayStringToMS,
|
||||
noop,
|
||||
renderRecursively,
|
||||
StrictMessageContent,
|
||||
stripObjectToScalars,
|
||||
tDelayString,
|
||||
tMessageContent,
|
||||
|
@ -84,7 +85,13 @@ export const ReplyAction = automodAction({
|
|||
continue;
|
||||
}
|
||||
|
||||
const replyMsg = await channel.createMessage(formatted);
|
||||
const messageContent: StrictMessageContent = typeof formatted === "string" ? { content: formatted } : formatted;
|
||||
const replyMsg = await channel.createMessage({
|
||||
...messageContent,
|
||||
allowedMentions: {
|
||||
users: [user.id],
|
||||
},
|
||||
});
|
||||
|
||||
if (typeof actionConfig === "object" && actionConfig.auto_delete) {
|
||||
const delay = convertDelayStringToMS(String(actionConfig.auto_delete))!;
|
||||
|
|
Loading…
Add table
Reference in a new issue