From a6c7cb95170a237343e6092a60206eb7380547cc Mon Sep 17 00:00:00 2001 From: byron <47872200+byeoon@users.noreply.github.com> Date: Wed, 13 Mar 2024 13:07:51 -0400 Subject: [PATCH] Also added the ability to send webhooks with TTS (For the sillies and goofs) --- src/plugins/WebhookManager/index.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/plugins/WebhookManager/index.tsx b/src/plugins/WebhookManager/index.tsx index 0d90e92f1..41efe8dc1 100644 --- a/src/plugins/WebhookManager/index.tsx +++ b/src/plugins/WebhookManager/index.tsx @@ -121,6 +121,12 @@ export default definePlugin({ description: "Send message as raw JSON", type: ApplicationCommandOptionType.BOOLEAN, required: false + }, + { + name: "tts", + description: "Send with TTS?", + type: ApplicationCommandOptionType.BOOLEAN, + required: false } ], @@ -133,17 +139,16 @@ export default definePlugin({ Native.executeWebhook("" + webhookUrl, { webhookMessage }); - } else { Native.executeWebhook("" + webhookUrl, { content: webhookMessage, username: webhookUsername ?? fetch("" + webhookUrl).then(response => response.json()), - avatar_url: "" + avatar_url: "", + tts: findOption(option, "tts") }); } - sendBotMessage(ctx.channel.id, { content: "Message sent successfully." });