diff --git a/lang/en-US/commands.json b/lang/en-US/commands.json index a41459e24..1a00206a2 100644 --- a/lang/en-US/commands.json +++ b/lang/en-US/commands.json @@ -33,7 +33,6 @@ "need_more_info": "You need to have either a description or title for an embed." }, "stats": { - "footer": "Made with love", "usage": "%COMMAND% has ran %USE% times.", "top_ten": "Top 10 most used commands:", "not_found": "The command `%COMMAND%` doesn't exist!" diff --git a/src/commands/bot/stats.ts b/src/commands/bot/stats.ts index 2c641fcfb..3c6e24128 100644 --- a/src/commands/bot/stats.ts +++ b/src/commands/bot/stats.ts @@ -65,18 +65,19 @@ export const command: SlashCommand = { { name: "Operating System", value: version }, ) .setFooter({ - text: interaction.strings().command.stats.footer, + text: "Made with love", iconURL: image, }); interaction .reply({ embeds: [embed], fetchReply: true }) .then((message: Message) => message.deleteButton()); }) - .set("command", async (interaction: ChatInputCommandInteraction, client: Client) => { + .set("command", async (interaction: ChatInputCommandInteraction) => { //if the command args are provided and the command does not exist in commandsProcessed: if ( interaction.options.getString("command") && - client.commandsProcessed.get(interaction.options.getString("command")) === undefined + interaction.client.commandsProcessed.get(interaction.options.getString("command")) === + undefined ) return interaction.reply({ ephemeral: true, @@ -92,14 +93,17 @@ export const command: SlashCommand = { .command.stats.usage.replace("%COMMAND%", interaction.options.getString("command")) .replace( "%USE%", - client.commandsProcessed.get(interaction.options.getString("command")).toString() ?? - "0", + interaction.client.commandsProcessed + .get(interaction.options.getString("command")) + .toString() ?? "0", ), ); - interaction.reply({ ephemeral: true, embeds: [embed], fetchReply: true }); + interaction.reply({ ephemeral: true, embeds: [embed] }); } else { //sorts commands by usage: 4,3,2,1 - const sorted = new Map([...client.commandsProcessed.entries()].sort((a, b) => b[1] - a[1])); + const sorted = new Map( + [...interaction.client.commandsProcessed.entries()].sort((a, b) => b[1] - a[1]), + ); const data = [[...sorted.keys()], [...sorted.values()]]; const embed = new EmbedBuilder()