Automod reply action embed fix
This commit is contained in:
parent
f6feb75e29
commit
2e49319e9c
2 changed files with 4 additions and 1 deletions
|
@ -11,6 +11,7 @@ import {
|
||||||
tMessageContent,
|
tMessageContent,
|
||||||
tNullable,
|
tNullable,
|
||||||
unique,
|
unique,
|
||||||
|
validateAndParseMessageContent,
|
||||||
verboseChannelMention,
|
verboseChannelMention,
|
||||||
} from "../../../utils";
|
} from "../../../utils";
|
||||||
import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions";
|
import { hasDiscordPermissions } from "../../../utils/hasDiscordPermissions";
|
||||||
|
@ -57,6 +58,7 @@ export const ReplyAction = automodAction({
|
||||||
user: userToTemplateSafeUser(user),
|
user: userToTemplateSafeUser(user),
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
const formatted =
|
const formatted =
|
||||||
typeof actionConfig === "string"
|
typeof actionConfig === "string"
|
||||||
? await renderReplyText(actionConfig)
|
? await renderReplyText(actionConfig)
|
||||||
|
@ -91,7 +93,7 @@ export const ReplyAction = automodAction({
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const messageContent: MessageOptions = typeof formatted === "string" ? { content: formatted } : formatted;
|
const messageContent = validateAndParseMessageContent(formatted);
|
||||||
const replyMsg = await channel.send({
|
const replyMsg = await channel.send({
|
||||||
...messageContent,
|
...messageContent,
|
||||||
allowedMentions: {
|
allowedMentions: {
|
||||||
|
|
|
@ -409,6 +409,7 @@ export const tStrictMessageContent = t.type({
|
||||||
content: tNullable(t.string),
|
content: tNullable(t.string),
|
||||||
tts: tNullable(t.boolean),
|
tts: tNullable(t.boolean),
|
||||||
disableEveryone: tNullable(t.boolean),
|
disableEveryone: tNullable(t.boolean),
|
||||||
|
embed: tNullable(tEmbed),
|
||||||
embeds: tNullable(t.array(tEmbed)),
|
embeds: tNullable(t.array(tEmbed)),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue