mirror of
https://github.com/Vendicated/Vencord.git
synced 2024-09-20 06:30:35 +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",
|
description: "Send message as raw JSON",
|
||||||
type: ApplicationCommandOptionType.BOOLEAN,
|
type: ApplicationCommandOptionType.BOOLEAN,
|
||||||
required: false
|
required: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "tts",
|
||||||
|
description: "Send with TTS?",
|
||||||
|
type: ApplicationCommandOptionType.BOOLEAN,
|
||||||
|
required: false
|
||||||
}
|
}
|
||||||
|
|
||||||
],
|
],
|
||||||
|
@ -133,17 +139,16 @@ export default definePlugin({
|
||||||
Native.executeWebhook("" + webhookUrl, {
|
Native.executeWebhook("" + webhookUrl, {
|
||||||
webhookMessage
|
webhookMessage
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Native.executeWebhook("" + webhookUrl, {
|
Native.executeWebhook("" + webhookUrl, {
|
||||||
content: webhookMessage,
|
content: webhookMessage,
|
||||||
username: webhookUsername ?? fetch("" + webhookUrl).then(response => response.json()),
|
username: webhookUsername ?? fetch("" + webhookUrl).then(response => response.json()),
|
||||||
avatar_url: ""
|
avatar_url: "",
|
||||||
|
tts: findOption(option, "tts")
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sendBotMessage(ctx.channel.id, {
|
sendBotMessage(ctx.channel.id, {
|
||||||
content: "Message sent successfully."
|
content: "Message sent successfully."
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue