mirror of
https://github.com/Vendicated/Vencord.git
synced 2024-09-19 22:20:34 +00:00
Also added the ability to send webhooks with TTS (For the sillies and goofs)
This commit is contained in:
parent
4cb2661ae9
commit
a6c7cb9517
1 changed files with 8 additions and 3 deletions
|
@ -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."
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue