diff --git a/src/client/commands/bug.js b/src/client/commands/bug.js index 667a623..a87a638 100644 --- a/src/client/commands/bug.js +++ b/src/client/commands/bug.js @@ -1,9 +1,11 @@ +import Discord from "discord.js"; + module.exports = { name: 'bug', description: 'Report a bug', permission: 'none', category: 'info', - async execute(interaction, client, Discord, command) { + async execute(interaction, client) { let message = {}; message.bugTitle = client.messages.bugTitle.replace("%client.user.username%", client.user.username); diff --git a/src/client/commands/help.js b/src/client/commands/help.js index 9ed5e44..2b7da61 100644 --- a/src/client/commands/help.js +++ b/src/client/commands/help.js @@ -1,9 +1,11 @@ +import Discord from "discord.js"; + module.exports = { name: 'help', description: 'Get help using bot', permission: 'none', category: 'info', - execute(interaction, client, Discord, command) { + execute(interaction, client) { let message = {}; const categories = []; diff --git a/src/client/commands/invite.js b/src/client/commands/invite.js index a833c43..38db87a 100644 --- a/src/client/commands/invite.js +++ b/src/client/commands/invite.js @@ -1,9 +1,11 @@ +import Discord from "discord.js"; + module.exports = { name: 'invite', description: 'Invite Bot', permission: 'none', category: 'info', - execute(interaction, client, Discord, command) { + execute(interaction, client) { let message = {}; message.inviteTitle = client.messages.inviteTitle.replace("%client.user.username%", client.user.username); const embed = new Discord.MessageEmbed() diff --git a/src/client/commands/list.js b/src/client/commands/list.js index c6c7f34..b0ce3fd 100644 --- a/src/client/commands/list.js +++ b/src/client/commands/list.js @@ -1,9 +1,11 @@ +import Discord from "discord.js"; + module.exports = { name: 'list', description: 'List radio stations', permission: 'none', category: 'radio', - execute(interaction, client, Discord) { + execute(interaction, client) { let message = {}; if(!client.stations) { message.errorToGetPlaylist = client.messages.errorToGetPlaylist.replace("%client.config.supportGuild%", client.config.supportGuild); diff --git a/src/client/commands/maintenance.js b/src/client/commands/maintenance.js index 53085fe..9913f4d 100644 --- a/src/client/commands/maintenance.js +++ b/src/client/commands/maintenance.js @@ -1,9 +1,11 @@ +import Discord from "discord.js"; + module.exports = { name: 'maintenance', description: 'Bot Maintenance', permission: 'none', category: 'info', - execute(interaction, client, Discord, command) { + execute(interaction, client) { let message = {}; if(!client.funcs.isDev(client.config.devId, interaction.user.id)) return interaction.reply(client.messageEmojis["error"] + client.messages.notAllowed); diff --git a/src/client/commands/next.js b/src/client/commands/next.js index cadeb34..3570995 100644 --- a/src/client/commands/next.js +++ b/src/client/commands/next.js @@ -3,7 +3,7 @@ module.exports = { description: 'Next Station', permission: 'none', category: 'info', - async execute(interaction, client, Discord) { + async execute(interaction, client) { let message = {}; const radio = client.radio.get(interaction.guild.id); if (!radio) return interaction.reply({ diff --git a/src/client/commands/nowplaying.js b/src/client/commands/nowplaying.js index 2e335fb..f5fc153 100644 --- a/src/client/commands/nowplaying.js +++ b/src/client/commands/nowplaying.js @@ -1,9 +1,11 @@ +import Discord from "discord.js"; + module.exports = { name: 'nowplaying', description: 'Current Radio Station', permission: 'none', category: 'radio', - async execute(interaction, client, Discord) { + async execute(interaction, client) { let message = {}; const radio = client.radio.get(interaction.guild.id); if (!radio) return interaction.reply({ diff --git a/src/client/commands/play.js b/src/client/commands/play.js index a1f9326..d8960fe 100644 --- a/src/client/commands/play.js +++ b/src/client/commands/play.js @@ -13,7 +13,7 @@ module.exports = { ], permission: "none", category: "radio", - async execute(interaction, client, Discord, command) { + async execute(interaction, client) { let message = {}; let query = interaction.options?.getString("query") ?? interaction.values?.[0]; if(!query){ diff --git a/src/client/commands/prev.js b/src/client/commands/prev.js index 476dc28..6b37ab7 100644 --- a/src/client/commands/prev.js +++ b/src/client/commands/prev.js @@ -3,7 +3,7 @@ module.exports = { description: 'Previous Station', permission: 'none', category: 'info', - async execute(interaction, client, Discord) { + async execute(interaction, client) { let message = {}; const radio = client.radio.get(interaction.guild.id); if (!radio) return interaction.reply({ diff --git a/src/client/commands/statistics.js b/src/client/commands/statistics.js index 2a71ed8..02886fe 100644 --- a/src/client/commands/statistics.js +++ b/src/client/commands/statistics.js @@ -1,9 +1,11 @@ +import Discord from "discord.js"; + module.exports = { name: 'statistics', description: 'Show statistics', permission: 'none', category: 'info', - execute(interaction, client, Discord) { + execute(interaction, client) { let message = {}; let stations = client.stations; let currentGuild = client.datastore.getEntry(interaction.guild.id); diff --git a/src/client/commands/status.js b/src/client/commands/status.js index 078cd02..6a3ce7b 100644 --- a/src/client/commands/status.js +++ b/src/client/commands/status.js @@ -1,9 +1,11 @@ +import Discord from "discord.js"; + module.exports = { name: 'status', description: 'Bot Status', permission: 'none', category: 'info', - async execute(interaction, client, Discord) { + async execute(interaction, client) { let message = {}; message.statusTitle = client.messages.statusTitle.replace("%client.user.username%", client.user.username); diff --git a/src/client/commands/stop.js b/src/client/commands/stop.js index c12cb9c..8f09b77 100644 --- a/src/client/commands/stop.js +++ b/src/client/commands/stop.js @@ -1,9 +1,11 @@ +import Discord from "discord.js"; + module.exports = { name: 'stop', description: 'Stop radio', permission: 'none', category: 'radio', - async execute(interaction, client, Discord) { + async execute(interaction, client) { const radio = client.radio.get(interaction.guild.id); if (client.funcs.check(client, interaction, command)) { client.funcs.statisticsUpdate(client, interaction.guild, radio); diff --git a/src/client/events/interactionCreate.js b/src/client/events/interactionCreate.js index b069289..4261d50 100644 --- a/src/client/events/interactionCreate.js +++ b/src/client/events/interactionCreate.js @@ -1,5 +1,3 @@ -import Discord from "discord.js"; - module.exports = { name: 'interactionCreate', async execute(client, interaction) { @@ -13,7 +11,7 @@ module.exports = { if (!command) return; try { - command.execute(interaction, client, Discord); + command.execute(interaction, client); } catch (error) { interaction.reply({ content: client.messages.runningCommandFailed, @@ -27,7 +25,7 @@ module.exports = { if (!command) return; try { - command.execute(interaction, client, Discord); + command.execute(interaction, client); } catch (error) { interaction.reply({ content: client.messages.runningCommandFailed,