3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Automod reply action embed fix

This commit is contained in:
Dragory 2021-08-19 19:54:02 +03:00
parent f6feb75e29
commit 2e49319e9c
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
2 changed files with 4 additions and 1 deletions

View file

@ -11,6 +11,7 @@ import {
tMessageContent,
tNullable,
unique,
validateAndParseMessageContent,
verboseChannelMention,
} from "../../../utils";
import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions";
@ -57,6 +58,7 @@ export const ReplyAction = automodAction({
user: userToTemplateSafeUser(user),
}),
);
const formatted =
typeof actionConfig === "string"
? await renderReplyText(actionConfig)
@ -91,7 +93,7 @@ export const ReplyAction = automodAction({
continue;
}
const messageContent: MessageOptions = typeof formatted === "string" ? { content: formatted } : formatted;
const messageContent = validateAndParseMessageContent(formatted);
const replyMsg = await channel.send({
...messageContent,
allowedMentions: {

View file

@ -409,6 +409,7 @@ export const tStrictMessageContent = t.type({
content: tNullable(t.string),
tts: tNullable(t.boolean),
disableEveryone: tNullable(t.boolean),
embed: tNullable(tEmbed),
embeds: tNullable(t.array(tEmbed)),
});