From 491feedfaf26b0802da7350ab7e1cf72ae713408 Mon Sep 17 00:00:00 2001 From: Raphael Date: Sun, 26 Oct 2025 17:51:13 +0100 Subject: [PATCH] refactor(commands/custom): now using the new log system --- src/commands/custom/set.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/commands/custom/set.ts b/src/commands/custom/set.ts index b03e3d1..edc52ce 100644 --- a/src/commands/custom/set.ts +++ b/src/commands/custom/set.ts @@ -8,6 +8,7 @@ import { } from 'discord.js'; import emoji from '../../../assets/emoji.json' assert { type: 'json' }; import { User as UserPrisma } from '@prisma/client'; +import { log } from '@lib/log.js'; export default { data: new SlashCommandBuilder() @@ -119,9 +120,7 @@ export default { }); } catch (err) { - console.error( - `\t⚠️ | Cannot get the database connection!\n\t\t(${err as Error}).`, - ); + log.error(err, 'Cannot get the database connection!'); await interaction.reply({ content: `${emoji.answer.error} | Cannot connect to the database`, flags: MessageFlags.Ephemeral, @@ -215,9 +214,7 @@ export default { content: `${emoji.answer.no} | Error during changing the bot profile picture`, flags: MessageFlags.Ephemeral, }); - console.error( - `\t⚠️ | Cannot change the bot profile picture!\n\t\t(${err as Error}).`, - ); + log.error(err, 'Cannot change the bot profile picture!'); } await interaction.reply({ content: `${emoji.answer.yes} | The picture profile of the bot is now updated.`,