From 645dcba59598a9f5dbdc6326001f2eb9ac2737cd Mon Sep 17 00:00:00 2001 From: Yuzu Date: Thu, 27 Jan 2022 17:58:44 +0700 Subject: [PATCH] Warning Embed, default don't replace on interaction --- src/utils/DiscordMessage.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/DiscordMessage.ts b/src/utils/DiscordMessage.ts index d13300c..d265efe 100644 --- a/src/utils/DiscordMessage.ts +++ b/src/utils/DiscordMessage.ts @@ -43,6 +43,10 @@ export function makeSuccessEmbed(options: any) { return makeEmbed(typeof options.icon === 'undefined' ? "✅" : options.icon, options.title, options.description, '#B5EAD7', options.fields, options.user, options.setTimestamp || true); } +export function makeWarningEmbed(options: any) { + return makeEmbed(typeof options.icon === 'undefined' ? "⚠️" : options.icon, options.title, options.description, '#FFEEAD', options.fields, options.user, options.setTimestamp || true); +} + export function makeErrorEmbed(options: any) { return makeEmbed(typeof options.icon === 'undefined' ? "❌" : options.icon, options.title, options.description, '#FF9AA2', options.fields, options.user, options.setTimestamp || true); } @@ -91,7 +95,7 @@ export async function sendReply(rMessage: Message, options: string | MessagePayl } -export async function sendMessageOrInteractionResponse(data: Message | Interaction, payload: MessageOptions | InteractionReplyOptions, replace?: boolean) { +export async function sendMessageOrInteractionResponse(data: Message | Interaction, payload: MessageOptions | InteractionReplyOptions, replace = false) { const isSlashCommand = data instanceof Interaction && data.isCommand(); const isMessage = data instanceof Message;