aboutsummaryrefslogtreecommitdiff
path: root/commands/join.js
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2022-03-29 00:03:42 -0400
committerAndrew Lee <alee14498@protonmail.com>2022-03-29 00:03:42 -0400
commit18f0b9d60c44f69fad6eb4716659c79f08f46711 (patch)
tree9f18c1753bfb3fd695a0cc26068d3dc1515cb153 /commands/join.js
parent08aae8cd9e5417bd7451b9af2e3190bf9c6a4e43 (diff)
downloadDLAP-18f0b9d60c44f69fad6eb4716659c79f08f46711.tar.gz
DLAP-18f0b9d60c44f69fad6eb4716659c79f08f46711.tar.bz2
DLAP-18f0b9d60c44f69fad6eb4716659c79f08f46711.zip
Permission system on certain commands
Diffstat (limited to 'commands/join.js')
-rw-r--r--commands/join.js2
1 files changed, 2 insertions, 0 deletions
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);
},