From cd5be9de38b9be071e7e47d27061cf62031dff62 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Wed, 6 Jul 2022 05:56:09 -0400 Subject: Cleaning up some stuff; Deprecating botOwner as Admin is required for commands --- commands/leave.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'commands/leave.js') diff --git a/commands/leave.js b/commands/leave.js index 5024488..63b4245 100644 --- a/commands/leave.js +++ b/commands/leave.js @@ -20,12 +20,14 @@ ***************************************************************************/ import { SlashCommandBuilder } from '@discordjs/builders' -import { destroyAudio } from "../AudioBackend.js"; +import { destroyAudio } from "../AudioBackend.js" +import { PermissionFlagsBits } from "discord-api-types/v10" export default { data: new SlashCommandBuilder() .setName('leave') - .setDescription('Leaves the voice chat'), + .setDescription('Leaves the voice chat') + .setDefaultMemberPermissions(PermissionFlagsBits.Administrator), async execute(interaction) { console.log('Leaving voice channel...'); await destroyAudio(interaction); -- cgit v1.2.3