diff --git a/src/client/commands/invite.ts b/src/client/commands/invite.ts index bd49c09..65268be 100644 --- a/src/client/commands/invite.ts +++ b/src/client/commands/invite.ts @@ -12,7 +12,6 @@ export default { ephemeral: true }); - let message: any = {}; const embed = new EmbedBuilder() .setTitle(client.messages.replace(client.messages.inviteTitle, { "%client.user.username%": client.user.username diff --git a/src/client/commands/list.ts b/src/client/commands/list.ts index 9b365df..eba28ed 100644 --- a/src/client/commands/list.ts +++ b/src/client/commands/list.ts @@ -6,7 +6,6 @@ export default { description: 'List radio stations', category: 'radio', execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient) { - let message: any = {}; if(!client.stations) { return interaction.reply({ diff --git a/src/client/commands/maintenance.ts b/src/client/commands/maintenance.ts index 6c2e82b..eb20c3a 100644 --- a/src/client/commands/maintenance.ts +++ b/src/client/commands/maintenance.ts @@ -11,7 +11,6 @@ export default { description: 'Bot Maintenance', category: 'info', async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient) { - let message: any = {}; if(!client.funcs.isDev(client.config.devIDs, interaction.user.id)) return interaction.reply({ content: client.messages.emojis["error"] + client.messages.notAllowed, diff --git a/src/client/commands/nowplaying.ts b/src/client/commands/nowplaying.ts index f5f6250..13a0855 100644 --- a/src/client/commands/nowplaying.ts +++ b/src/client/commands/nowplaying.ts @@ -7,7 +7,7 @@ export default { category: 'radio', async execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient, command: any) { if(client.funcs.check(client, interaction, command)) { - let message: any = {}; + const radio = client.radio?.get(interaction.guild?.id); let date = new Date(); diff --git a/src/client/commands/play.ts b/src/client/commands/play.ts index b5e580f..2122be6 100644 --- a/src/client/commands/play.ts +++ b/src/client/commands/play.ts @@ -11,7 +11,6 @@ export default { ], category: "radio", async execute(interaction: ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient) { - let message: any = {}; if(!client.stations) { return interaction.reply({ diff --git a/src/client/commands/statistics.ts b/src/client/commands/statistics.ts index 3ec0cb7..0cccbfb 100644 --- a/src/client/commands/statistics.ts +++ b/src/client/commands/statistics.ts @@ -7,7 +7,6 @@ export default { description: 'Show statistics', category: 'info', execute(interaction: ButtonInteraction | ChatInputCommandInteraction | StringSelectMenuInteraction, client: RadioClient) { - let message: any = {}; if(!interaction.guild) return interaction.reply({ content: client.messages.emojis["error"] + client.messages.maintenance, diff --git a/src/client/commands/status.ts b/src/client/commands/status.ts index 4f9ec4a..6d2418d 100644 --- a/src/client/commands/status.ts +++ b/src/client/commands/status.ts @@ -6,14 +6,12 @@ export default { description: 'Bot Status', category: 'info', async execute(interaction: any, client: RadioClient) { - let message: any = {}; if(!client.user) return interaction.reply({ content: client.messages.emojis["error"] + client.messages.maintenance, ephemeral: true }); - message.statusTitle = client.messages.statusTitle.replace("%client.user.username%", client.user.username); let uptime = client.funcs.msToTime(client.uptime || 0); const embed = new EmbedBuilder() diff --git a/src/client/funcs/check.ts b/src/client/funcs/check.ts index 1e27cdf..449d16d 100644 --- a/src/client/funcs/check.ts +++ b/src/client/funcs/check.ts @@ -1,7 +1,8 @@ import RadioClient from "../../Client"; import { command } from "../commands"; + export default function check(client: RadioClient, interaction: any, command: command) { - let message: any = {}; + const radio = client.radio?.get(interaction.guild.id); if(!client.stations) { interaction.reply({