3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-16 22:21:51 +00:00

Fix user mention not working in Automod reply action

This commit is contained in:
Dragory 2021-04-29 00:56:56 +03:00
parent eb9cd080fd
commit b541d5d087
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -4,6 +4,7 @@ import {
convertDelayStringToMS, convertDelayStringToMS,
noop, noop,
renderRecursively, renderRecursively,
StrictMessageContent,
stripObjectToScalars, stripObjectToScalars,
tDelayString, tDelayString,
tMessageContent, tMessageContent,
@ -84,7 +85,13 @@ export const ReplyAction = automodAction({
continue; 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) { if (typeof actionConfig === "object" && actionConfig.auto_delete) {
const delay = convertDelayStringToMS(String(actionConfig.auto_delete))!; const delay = convertDelayStringToMS(String(actionConfig.auto_delete))!;