diff --git a/src/client/commands/bug.js b/src/client/commands/bug.js index a87a638..48091b1 100644 --- a/src/client/commands/bug.js +++ b/src/client/commands/bug.js @@ -3,7 +3,6 @@ import Discord from "discord.js"; module.exports = { name: 'bug', description: 'Report a bug', - permission: 'none', category: 'info', async execute(interaction, client) { let message = {}; diff --git a/src/client/commands/help.js b/src/client/commands/help.js index 2b7da61..212346b 100644 --- a/src/client/commands/help.js +++ b/src/client/commands/help.js @@ -3,7 +3,6 @@ import Discord from "discord.js"; module.exports = { name: 'help', description: 'Get help using bot', - permission: 'none', category: 'info', execute(interaction, client) { let message = {}; diff --git a/src/client/commands/invite.js b/src/client/commands/invite.js index 38db87a..5c66601 100644 --- a/src/client/commands/invite.js +++ b/src/client/commands/invite.js @@ -3,7 +3,6 @@ import Discord from "discord.js"; module.exports = { name: 'invite', description: 'Invite Bot', - permission: 'none', category: 'info', execute(interaction, client) { let message = {}; diff --git a/src/client/commands/list.js b/src/client/commands/list.js index b89772e..5a18b64 100644 --- a/src/client/commands/list.js +++ b/src/client/commands/list.js @@ -3,7 +3,6 @@ import Discord from "discord.js"; module.exports = { name: 'list', description: 'List radio stations', - permission: 'none', category: 'radio', execute(interaction, client) { let message = {}; diff --git a/src/client/commands/maintenance.js b/src/client/commands/maintenance.js index 5de9f58..86f23e9 100644 --- a/src/client/commands/maintenance.js +++ b/src/client/commands/maintenance.js @@ -4,7 +4,6 @@ import fetch from "node-fetch"; module.exports = { name: 'maintenance', description: 'Bot Maintenance', - permission: 'none', category: 'info', options: [ { type: "NUMBER", name: "action", description: "Select action", required: false} diff --git a/src/client/commands/next.js b/src/client/commands/next.js index 56747d3..94d1f51 100644 --- a/src/client/commands/next.js +++ b/src/client/commands/next.js @@ -1,7 +1,6 @@ module.exports = { name: 'next', description: 'Next Station', - permission: 'none', category: 'radio', async execute(interaction, client, command) { if (client.funcs.check(client, interaction, command)) { diff --git a/src/client/commands/nowplaying.js b/src/client/commands/nowplaying.js index e6b2e62..bf42da9 100644 --- a/src/client/commands/nowplaying.js +++ b/src/client/commands/nowplaying.js @@ -3,7 +3,6 @@ import Discord from "discord.js"; module.exports = { name: 'nowplaying', description: 'Current Radio Station', - permission: 'none', category: 'radio', async execute(interaction, client, command) { if (client.funcs.check(client, interaction, command)) { diff --git a/src/client/commands/play.js b/src/client/commands/play.js index 8bca7e7..fb29976 100644 --- a/src/client/commands/play.js +++ b/src/client/commands/play.js @@ -11,7 +11,6 @@ module.exports = { options: [ { type: "STRING", name: "query", description: "Select station", required: false} ], - permission: "none", category: "radio", async execute(interaction, client) { let message = {}; diff --git a/src/client/commands/prev.js b/src/client/commands/prev.js index eb7e572..ef4393a 100644 --- a/src/client/commands/prev.js +++ b/src/client/commands/prev.js @@ -1,7 +1,6 @@ module.exports = { name: 'prev', description: 'Previous Station', - permission: 'none', category: 'radio', async execute(interaction, client, command) { if (client.funcs.check(client, interaction, command)) { diff --git a/src/client/commands/statistics.js b/src/client/commands/statistics.js index d9ba2fe..df31e33 100644 --- a/src/client/commands/statistics.js +++ b/src/client/commands/statistics.js @@ -4,7 +4,6 @@ import Discord from "discord.js"; module.exports = { name: 'statistics', description: 'Show statistics', - permission: 'none', category: 'info', execute(interaction, client) { let message = {}; diff --git a/src/client/commands/status.js b/src/client/commands/status.js index 6a3ce7b..c40fdbd 100644 --- a/src/client/commands/status.js +++ b/src/client/commands/status.js @@ -3,7 +3,6 @@ import Discord from "discord.js"; module.exports = { name: 'status', description: 'Bot Status', - permission: 'none', category: 'info', async execute(interaction, client) { let message = {}; diff --git a/src/client/commands/stop.js b/src/client/commands/stop.js index 9c53249..fbdb3e9 100644 --- a/src/client/commands/stop.js +++ b/src/client/commands/stop.js @@ -3,7 +3,6 @@ import Discord from "discord.js"; module.exports = { name: 'stop', description: 'Stop radio', - permission: 'none', category: 'radio', async execute(interaction, client, command) { const radio = client.radio.get(interaction.guild.id); diff --git a/src/client/funcs/check.js b/src/client/funcs/check.js index 38fe48a..cfbbbc5 100644 --- a/src/client/funcs/check.js +++ b/src/client/funcs/check.js @@ -24,14 +24,6 @@ module.exports = function (client, interaction, command) { }); return false; } - if(!command.permission == 'none'){ - if (!permissions.has(command.permission)) { - message.noPerms = client.messages.noPerms.replace("%command.permission%", command.permission); - interaction.reply({ - content: client.messageEmojis["error"] + message.noPerms, - ephemeral: true - }); - return false; - } else return true; - } else return true; + + return true; };