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/join.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'commands/join.js') diff --git a/commands/join.js b/commands/join.js index 45f513c..8778aae 100644 --- a/commands/join.js +++ b/commands/join.js @@ -21,12 +21,14 @@ import { SlashCommandBuilder } from '@discordjs/builders' import { voiceInit } from "../AudioBackend.js"; +import config from '../config.json' assert {type: 'json'} export default { data: new SlashCommandBuilder() .setName('join') .setDescription('Joins voice chat.'), 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 }); await interaction.reply('Joining voice channel') voiceInit(bot); }, -- cgit v1.2.3