mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-19 13:46:56 +02:00
trop de truc pour tout ecrire
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
const Discord = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
name: "voicekick",
|
||||
aliases: ["vckick"],
|
||||
description: "Permet de kick un utilisateur d'un vocal",
|
||||
category: 'moderation',
|
||||
emote: '🔊',
|
||||
utilisation: 'voicekick @user/id]',
|
||||
async execute(message, args, client) {
|
||||
let user = message.guild.members.cache.get(args[0]) || message.mentions.members.first();
|
||||
if (!user) return;
|
||||
if(!user.voice.channel) return message.reply(`${user.user.username} n'est pas dans un salon vocal`)
|
||||
await user.voice.setChannel(null).then(async () => {
|
||||
await message.reply(`${user.user.username} a été kick du salon vocal`)
|
||||
}).catch(async () => {
|
||||
await message.reply(`${user.user.username} n'a pas pu être kick du salon vocal`)
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user