mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-19 13:46:56 +02:00
Update help with good configurationon commands
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
name: 'leave',
|
||||
description: 'Faire quitter le bot d\`un serveur',
|
||||
emote: '🚪',
|
||||
utilisation: 'leave [guildId]',
|
||||
category: 'botcontrol',
|
||||
|
||||
async execute(message, args, client) {
|
||||
|
||||
// If an ID is provided, try to get the guild with that ID
|
||||
const guildId = args[0];
|
||||
if (guildId) {
|
||||
const guild = client.guilds.cache.get(guildId);
|
||||
if (guild) {
|
||||
guild.leave();
|
||||
message.reply(`Je vien de quitté: ${guild.name}`);
|
||||
} else {
|
||||
message.reply('Je ne suis pas dans ce serveur.');
|
||||
}
|
||||
} else {
|
||||
message.guild.leave();
|
||||
}
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user