From 18f0b9d60c44f69fad6eb4716659c79f08f46711 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Tue, 29 Mar 2022 00:03:42 -0400 Subject: Permission system on certain commands --- commands/control.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'commands/control.js') diff --git a/commands/control.js b/commands/control.js index b3dd0bf..28c3aad 100644 --- a/commands/control.js +++ b/commands/control.js @@ -30,8 +30,9 @@ export default { .setName('control') .setDescription('Controlling the music'), async execute(interaction, bot) { + if (![config.botOwner].includes(interaction.user.id)) return await interaction.reply({ content: "You do not have permissions to execute this command.", ephemeral: true }); const controlEmbed = new MessageEmbed() - .setAuthor({name:`${bot.user.username} Control Panel`, iconURL:bot.user.avatarURL()}) + .setAuthor({name: `${bot.user.username} Control Panel`, iconURL: bot.user.avatarURL()}) .addField('State', 'Playing') .addField('Currently Playing', audio) //.addField('Next Music', '(a possible feature when queue system is implemented?)') -- cgit v1.2.3