From a0a9cac16d621a1236b70a1f53c15f4ebebf1e89 Mon Sep 17 00:00:00 2001 From: Raphael Date: Tue, 14 Oct 2025 00:17:45 +0200 Subject: [PATCH] refactor(cmd/custom): adding the tsconfig + eslint correction --- src/commands/custom/set.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/commands/custom/set.ts b/src/commands/custom/set.ts index cb478a5..b03e3d1 100644 --- a/src/commands/custom/set.ts +++ b/src/commands/custom/set.ts @@ -1,9 +1,9 @@ -import { prisma } from '../../lib/prisma.ts'; +import { prisma } from '@lib/prisma'; +import { SlashCommandBuilder } from '@discordjs/builders'; import { ActivityType, PresenceUpdateStatus, MessageFlags, - SlashCommandBuilder, CommandInteraction, } from 'discord.js'; import emoji from '../../../assets/emoji.json' assert { type: 'json' }; @@ -120,7 +120,7 @@ export default { } catch (err) { console.error( - `\t⚠️ | Cannot get the database connection!\n\t\t(${err}).`, + `\t⚠️ | Cannot get the database connection!\n\t\t(${err as Error}).`, ); await interaction.reply({ content: `${emoji.answer.error} | Cannot connect to the database`, @@ -208,7 +208,7 @@ export default { } const newPicture: string = interaction.options.getString('link'); try { - interaction.client.user.setAvatar(newPicture); + await interaction.client.user.setAvatar(newPicture); } catch (err) { await interaction.reply({ @@ -216,7 +216,7 @@ export default { flags: MessageFlags.Ephemeral, }); console.error( - `\t⚠️ | Cannot change the bot profile picture!\n\t\t(${err}).`, + `\t⚠️ | Cannot change the bot profile picture!\n\t\t(${err as Error}).`, ); } await interaction.reply({ @@ -312,7 +312,7 @@ export default { } catch (err) { await interaction.reply({ - content: `${emoji.answer.no} | Cannot change the status\n\n\t${err}`, + content: `${emoji.answer.no} | Cannot change the status\n\n\t${err as Error}`, flags: MessageFlags.Ephemeral, }); return;