diff --git a/src/plugins/WebhookManager/index.tsx b/src/plugins/WebhookManager/index.tsx index a24574022..a510fc942 100644 --- a/src/plugins/WebhookManager/index.tsx +++ b/src/plugins/WebhookManager/index.tsx @@ -13,7 +13,6 @@ import { RestAPI } from "@webpack/common"; const Native = VencordNative.pluginHelpers.WebhookManager as PluginNative; const WMLogger = new Logger("WebhookManager"); let sourceGuildGet; -let sourceChannelGet; export default definePlugin({ name: "WebhookManager", description: "Manage your webhooks easily; delete, send messages, get detailed info and more.", @@ -74,20 +73,16 @@ export default definePlugin({ .then(response => { WMLogger.info(JSON.stringify(response)); if (response.type === 2) { - const sourceGuild = ` + const sourceWebhook = ` Source Server ID: ${response.source_guild.id} Source Server Name: ${response.source_guild.name} - `; - sourceGuildGet = sourceGuild; - const sourceChannel = ` Source Channel ID: ${response.source_channel.id} Source Channel Name: ${response.source_channel.name} `; - sourceChannelGet = sourceChannel; + sourceGuildGet = sourceWebhook; } else { sourceGuildGet = ""; - sourceChannelGet = ""; } sendBotMessage(ctx.channel.id, { content: `This webhook was created by <@${response.user.id}>.`, @@ -110,7 +105,6 @@ export default definePlugin({ Channel ID: ${response.channel_id} Server ID: ${response.guild_id} ${sourceGuildGet} - ${sourceChannelGet} Creator UserID: ${response.user.id}` }] @@ -173,6 +167,7 @@ export default definePlugin({ avatar_url: "", tts: findOption(option, "tts") }); + } sendBotMessage(ctx.channel.id, { content: "Message sent successfully."