small code refactors and changes to text

This commit is contained in:
byron 2024-04-09 12:32:53 -04:00 committed by GitHub
parent 70ae9eabf4
commit b4366bdab6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -41,7 +41,7 @@ export default definePlugin({
} }
else { else {
sendBotMessage(ctx.channel.id, { sendBotMessage(ctx.channel.id, {
content: "There was an error with deleting the webhook, error code: " + res.status content: "There was an error with deleting the webhook, Error: " + res.status
}); });
} }
} }
@ -112,7 +112,7 @@ export default definePlugin({
}, },
{ {
name: "username", name: "username",
description: "Send with a custom webhook username", description: "Send with a custom username",
type: ApplicationCommandOptionType.STRING, type: ApplicationCommandOptionType.STRING,
required: false required: false
}, },
@ -147,13 +147,11 @@ export default definePlugin({
}); });
} }
else { else {
if (webhookUsername === "") { if (webhookUsername === "")
webhookUsername = undefined; webhookUsername = undefined;
}
if (webhookProfilePic === "") { if (webhookProfilePic === "")
webhookProfilePic = undefined; webhookProfilePic = undefined;
}
Native.executeWebhook("" + webhookUrl, { Native.executeWebhook("" + webhookUrl, {
content: webhookMessage, content: webhookMessage,