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');