mirror of
https://github.com/Vendicated/Vencord.git
synced 2024-09-20 06:30:35 +00:00
Logger for error handling instead of console.log
This commit is contained in:
parent
9060352977
commit
1c3e33dbbd
1 changed files with 4 additions and 2 deletions
|
@ -8,8 +8,10 @@ import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption,
|
|||
import { Devs } from "@utils/constants";
|
||||
import definePlugin, { PluginNative } from "@utils/types";
|
||||
import { RestAPI } from "@webpack/common";
|
||||
import { Logger } from "@utils/Logger";
|
||||
|
||||
const Native = VencordNative.pluginHelpers.WebhookManager as PluginNative<typeof import("./native")>;
|
||||
const WMLogger = new Logger("WebhookManager");
|
||||
|
||||
export default definePlugin({
|
||||
name: "WebhookManager",
|
||||
|
@ -39,14 +41,14 @@ export default definePlugin({
|
|||
});
|
||||
}
|
||||
else {
|
||||
console.log("WebhookManager encountered an error deleting a webhook. " + res.status);
|
||||
WMLogger.error("WebhookManager encountered an error deleting a webhook. " + res.status);
|
||||
sendBotMessage(ctx.channel.id, {
|
||||
content: "There was an error deleting the webhook. Check the console for more info."
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
console.log("WebhookManager encountered an error deleting a webhook. " + error);
|
||||
WMLogger.error("WebhookManager encountered an error deleting a webhook. " + error);
|
||||
sendBotMessage(ctx.channel.id, {
|
||||
content: "There was an error deleting the webhook. Check the console for more info. Did you input a valid webhook URL?"
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue