mirror of
https://github.com/Vendicated/Vencord.git
synced 2024-09-19 22:20:34 +00:00
fixed that god-awful annoying bug where you couldnt use the default webhook name
This commit is contained in:
parent
f43f404123
commit
9c7c3d0c5d
1 changed files with 4 additions and 2 deletions
|
@ -139,7 +139,7 @@ export default definePlugin({
|
|||
name: "username",
|
||||
description: "Send with a custom webhook username",
|
||||
type: ApplicationCommandOptionType.STRING,
|
||||
required: true
|
||||
required: false
|
||||
},
|
||||
{
|
||||
name: "tts",
|
||||
|
@ -165,9 +165,11 @@ export default definePlugin({
|
|||
});
|
||||
}
|
||||
else {
|
||||
fetch("" + webhookUrl).then(response => response.json().then(response => { if (webhookUsername === "") { webhookUsername = response.name; } }));
|
||||
|
||||
Native.executeWebhook("" + webhookUrl, {
|
||||
content: webhookMessage,
|
||||
username: webhookUsername ?? fetch("" + webhookUrl).then(response => response.json().then(response => { webhookUsername = response.name; })),
|
||||
username: webhookUsername,
|
||||
avatar_url: "",
|
||||
tts: findOption(option, "tts")
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue