diff --git a/src/api/cat/index.js b/src/api/cat/index.js index 322c610..e061456 100644 --- a/src/api/cat/index.js +++ b/src/api/cat/index.js @@ -5,8 +5,8 @@ const cat = async () => { .then((res) => { return res.data.file; }) - .catch((err) => { - console.log(err); + .catch((e) => { + console.log(e); }); }; diff --git a/src/api/fox/index.js b/src/api/fox/index.js index 34d9836..0ab7e29 100644 --- a/src/api/fox/index.js +++ b/src/api/fox/index.js @@ -5,8 +5,8 @@ const fox = async () => { .then((res) => { return res.data.image; }) - .catch((err) => { - console.log(err); + .catch((e) => { + console.log(e); }); }; diff --git a/src/handlers/InteractionHandler.js b/src/handlers/InteractionHandler.js index 8d295d1..1441006 100644 --- a/src/handlers/InteractionHandler.js +++ b/src/handlers/InteractionHandler.js @@ -21,8 +21,8 @@ const InteractionHandler = class { }); } return this; - } catch(err) { - throw err; + } catch(e) { + throw e; } } @@ -41,8 +41,8 @@ const InteractionHandler = class { .then(() => { console.log(`${chalk.green('Done:')} all commands are registered at the dev guild`); }) - .catch((err) => { - console.log(`${chalk.red('Error:')} ${err}`); + .catch((e) => { + console.log(`${chalk.red('Error:')} ${e}`); }); } @@ -53,8 +53,8 @@ const InteractionHandler = class { .then(() => { console.log(`${chalk.green('Done:')} all commands are unregistered at the dev guild`); }) - .catch((err) => { - console.log(`${chalk.red('Error:')} ${err}`); + .catch((e) => { + console.log(`${chalk.red('Error:')} ${e}`); }); } @@ -63,8 +63,8 @@ const InteractionHandler = class { .then(() => { console.log(`${chalk.green('Done:')} command '${commandId}' has been unregistered at the dev guild`); }) - .catch((err) => { - console.log(`${chalk.red('Error:')} ${err}`); + .catch((e) => { + console.log(`${chalk.red('Error:')} ${e}`); }); } @@ -75,8 +75,8 @@ const InteractionHandler = class { .then(() => { console.log(`${chalk.green('Done:')} all commands are registered globally`); }) - .catch((err) => { - console.log(`${chalk.red('Error:')} ${err}`); + .catch((e) => { + console.log(`${chalk.red('Error:')} ${e}`); }); } @@ -87,8 +87,8 @@ const InteractionHandler = class { .then(() => { console.log(`${chalk.green('Done:')} all commands are unregistered globally`); }) - .catch((err) => { - console.log(`${chalk.red('Error:')} ${err}`); + .catch((e) => { + console.log(`${chalk.red('Error:')} ${e}`); }); } @@ -97,8 +97,8 @@ const InteractionHandler = class { .then(() => { console.log(`${chalk.green('Done:')} command '${commandId}' has been unregistered globally`); }) - .catch((err) => { - console.log(`${chalk.red('Error:')} ${err}`); + .catch((e) => { + console.log(`${chalk.red('Error:')} ${e}`); }); } }; diff --git a/src/handlers/PresenceHandler.js b/src/handlers/PresenceHandler.js index 5225320..1364a58 100644 --- a/src/handlers/PresenceHandler.js +++ b/src/handlers/PresenceHandler.js @@ -30,8 +30,8 @@ const PresenceHandler = class { await client.user.setPresence(presencePayload); return { status: this.status, content: this.content, type: type }; - } catch (err) { - throw err; + } catch (e) { + throw e; } } }; diff --git a/src/~Luna.js b/src/~Luna.js index f268ec0..46a1975 100644 --- a/src/~Luna.js +++ b/src/~Luna.js @@ -20,9 +20,9 @@ const LunaInteractionHandler = await new InteractionHandler().init(TOKEN) console.log(`${chalk.green('Done:')} InteractionHandler initialized successfully`) return handler; }) - .catch((err) => { + .catch((e) => { console.log(`${chalk.red('Error:')} can not initialize InteractionHandler`) - throw err; + throw e; }); const LunaAPIService = await new APIService().init(); @@ -99,9 +99,9 @@ Luna.on(Discord.Events.ClientReady, async () => { .then((res) => { console.log(`${chalk.green('Done:')} PresenceHandler initialized successfully | status: ${res.status} | type: ${res.type} | content: ${res.content}`); }) - .catch((err) => { + .catch((e) => { console.log(`${chalk.red('Error:')} can not initialize PresenceHandler`); - throw err; + throw e; }); await LunaInteractionHandler.registerCommandsDev(CLIENT_ID, DEV_GUILD_ID); });