From 4e796f275e332ad61522c274b870c165312fb7f1 Mon Sep 17 00:00:00 2001 From: Lezetho <126505858+lezetho@users.noreply.github.com> Date: Tue, 10 Sep 2024 13:00:00 +0545 Subject: [PATCH] Update index.js --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index ff491c5..c7fe390 100644 --- a/index.js +++ b/index.js @@ -202,6 +202,8 @@ async function createMessage({ cache, panel, nodes, servers, users }) { function DiscordErrorHandler(error) { if (error.rawError?.code === 429) { console.log(cliColor.cyanBright("[PteroStats] ") + cliColor.redBright("Error 429 | Your IP has been rate limited by either Discord or your website. If it's a rate limit with Discord, you must wait. If it's a issue with your website, consider whitelisting your server IP.")); + } else if (error.rawError?.code === 403) { + console.log(cliColor.cyanBright("[PteroStats] ") + cliColor.redBright("FORBIDDEN | The channel ID you provided is incorrect. Please double check you have the right ID. If you're not sure, read our documentation: https://github.com/lezetho/--PteroStats?tab=readme-ov-file#getting-channel-id")); } else if (error.code === "ENOTFOUND") { console.log(cliColor.cyanBright("[PteroStats] ") + cliColor.redBright("ENOTFOUND | DNS Error. Ensure your network connection and DNS server are functioning correctly.")); } else if (error.rawError?.code === 50001) {