From c91edf03605ecf3b05acb7e2dbffe3b742827633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20Olausson=20Holten=C3=A4s?= Date: Sun, 6 Mar 2022 10:32:38 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=A6=20=F0=9F=94=8A=20added=20missing?= =?UTF-8?q?=20logger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy-commands.js | 10 ++++++---- src/commands/utilities/addons/lookup.js | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/deploy-commands.js b/deploy-commands.js index 45cd34f..eb36e2f 100644 --- a/deploy-commands.js +++ b/deploy-commands.js @@ -1,5 +1,5 @@ -// __basedir = __dirname; -// __config = require(`${__basedir}/config.json`); +const logger = require(`${__basedir}/handlers/logger`); + module.exports = async () => { const fs = require('node:fs'); const { REST } = require('@discordjs/rest'); @@ -19,6 +19,8 @@ module.exports = async () => { .put(Routes.applicationGuildCommands(__config.bot.clientId, __config.bot.guildId), { body: commands, }) - .then(() => console.log('Successfully registered application commands.')) - .catch(console.error); + .then(async () => await logger.info('Successfully registered application commands.')) + .catch(async (err) => { + await logger.error(err); + }); }; diff --git a/src/commands/utilities/addons/lookup.js b/src/commands/utilities/addons/lookup.js index 6220dc2..d4966f8 100644 --- a/src/commands/utilities/addons/lookup.js +++ b/src/commands/utilities/addons/lookup.js @@ -1,4 +1,7 @@ +const logger = require(`${__basedir}/handlers/logger`); + const axios = require('axios'); + module.exports = async (interaction) => { try { const target = await interaction.options.getString('target');