🎨 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, title: ':toolbox: Admin - Counters [Add]' as string,
description: description:
'That channel is not supported, it needs to be a text channel.' as string, '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, color: config?.colors?.error as ColorResolvable,
footer: { footer: {
iconURL: config?.footer?.icon as string, iconURL: config?.footer?.icon as string,
@ -38,7 +38,7 @@ export default async (interaction: CommandInteraction) => {
}; };
// Return interaction reply // Return interaction reply
return await interaction?.editReply({ embeds: [embed] }); return interaction?.editReply({ embeds: [embed] });
} }
const counterExist = await counterSchema?.findOne({ const counterExist = await counterSchema?.findOne({
@ -57,11 +57,10 @@ export default async (interaction: CommandInteraction) => {
const embed = { const embed = {
title: ':toolbox: Admin - Counters [Add]' as string, title: ':toolbox: Admin - Counters [Add]' as string,
description: description: `${optionChannel} is now counting when hearing word ${optionWord} and it starts at number ${
`${optionChannel} is now counting when hearing word ${optionWord} and it starts at number ${ optionStart || 0
optionStart || 0 }.`,
}.` as string, timestamp: new Date(),
timestamp: new Date() as Date,
color: config?.colors?.success as ColorResolvable, color: config?.colors?.success as ColorResolvable,
footer: { footer: {
iconURL: config?.footer?.icon as string, iconURL: config?.footer?.icon as string,
@ -81,8 +80,8 @@ export default async (interaction: CommandInteraction) => {
// Embed object // Embed object
const embed = { const embed = {
title: ':toolbox: Admin - Counters [Add]' as string, title: ':toolbox: Admin - Counters [Add]' as string,
description: `${optionChannel} is already a counting channel.` as string, description: `${optionChannel} is already a counting channel.`,
timestamp: new Date() as Date, timestamp: new Date(),
color: config?.colors?.error as ColorResolvable, color: config?.colors?.error as ColorResolvable,
footer: { footer: {
iconURL: config?.footer?.icon as string, iconURL: config?.footer?.icon as string,