web/src/commands/leave.js

24 lines
618 B
JavaScript
Raw Normal View History

const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
const { __glob } = require("../modules/global-variables");
const subplayer = require(__glob.SUBPLAYER);
module.exports = {
data: new SlashCommandBuilder()
.setName("leave")
.setDescription("[NEW] Déconnecte le Bot !"),
async execute(client, interaction) {
// CHECK MEMBER IF IN VOICE CHANNEL
if(!interaction.member.voice.channel) return interaction.reply({content:"Vous devez rejoindre un salon vocal pour contrôler le Bot !", ephemeral: true})
subplayer.leave(client, interaction)
}
}