trop de truc pour tout ecrire

This commit is contained in:
VALOU3336
2024-02-29 18:57:43 +01:00
parent b1768e24bd
commit af836f4c1e
43 changed files with 2902 additions and 119 deletions
+27
View File
@@ -0,0 +1,27 @@
const Discord = require('discord.js');
module.exports = {
name: "voicekickall",
aliases: ["vckickall"],
description: "Permet de kick tout les membres d'un channel vocal",
category: 'moderation',
emote: '🔊',
utilisation: 'voicekickall [#channel/id] ',
async execute(message, args, client) {
let channelInput = message.mentions.channels.first() || message.guild.channels.cache.get(args[0])
if (!channelInput) return;
if (channelInput.type !== Discord.ChannelType.GuildVoice) return message.reply('veuillez mentioner un salon vocal');
try {
channelInput.members.forEach(member => {
if (member.voice.channel) {
member.voice.setChannel(null)
}
})
await message.reply(`Le salon vocal ${channelInput} a été vidé.`);
} catch (error) {
await message.reply('Une erreur s\'est produite lors du déplacement des membres du salon vocal.');
}
}
}