🎨 code smells fixed

This commit is contained in:
Axel Olausson Holtenäs 2022-04-10 22:10:27 +02:00
parent 470e8ce45e
commit d73a9c10f8
No known key found for this signature in database
GPG key ID: 9347A5E873995701

View file

@ -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,