From d73a9c10f8b0ff47638c379f6866a4b494d8f9bf Mon Sep 17 00:00:00 2001 From: Vermium Sifell Date: Sun, 10 Apr 2022 22:10:27 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20code=20smells=20fixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/commands/admin/counters/modules/add.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/commands/admin/counters/modules/add.ts b/src/commands/admin/counters/modules/add.ts index a058d09..588a77a 100644 --- a/src/commands/admin/counters/modules/add.ts +++ b/src/commands/admin/counters/modules/add.ts @@ -29,7 +29,7 @@ export default async (interaction: CommandInteraction) => { title: ':toolbox: Admin - Counters [Add]' as string, description: 'That channel is not supported, it needs to be a text channel.' as string, - timestamp: new Date() as Date, + timestamp: new Date(), color: config?.colors?.error as ColorResolvable, footer: { iconURL: config?.footer?.icon as string, @@ -38,7 +38,7 @@ export default async (interaction: CommandInteraction) => { }; // Return interaction reply - return await interaction?.editReply({ embeds: [embed] }); + return interaction?.editReply({ embeds: [embed] }); } const counterExist = await counterSchema?.findOne({ @@ -57,11 +57,10 @@ export default async (interaction: CommandInteraction) => { const embed = { title: ':toolbox: Admin - Counters [Add]' as string, - description: - `${optionChannel} is now counting when hearing word ${optionWord} and it starts at number ${ - optionStart || 0 - }.` as string, - timestamp: new Date() as Date, + description: `${optionChannel} is now counting when hearing word ${optionWord} and it starts at number ${ + optionStart || 0 + }.`, + timestamp: new Date(), color: config?.colors?.success as ColorResolvable, footer: { iconURL: config?.footer?.icon as string, @@ -81,8 +80,8 @@ export default async (interaction: CommandInteraction) => { // Embed object const embed = { title: ':toolbox: Admin - Counters [Add]' as string, - description: `${optionChannel} is already a counting channel.` as string, - timestamp: new Date() as Date, + description: `${optionChannel} is already a counting channel.`, + timestamp: new Date(), color: config?.colors?.error as ColorResolvable, footer: { iconURL: config?.footer?.icon as string,