mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-06 06:10:39 +02:00
add devs commande
This commit is contained in:
@@ -7,7 +7,6 @@ module.exports = {
|
||||
category: 'botcontrol',
|
||||
|
||||
async execute(message, args, client) {
|
||||
// Vérifiez si l'utilisateur a fourni suffisamment d'arguments
|
||||
if (args.length < 2) {
|
||||
return message.reply('Veuillez fournir un paramètre parmis `name` ou `pic` pour sa valeur.');
|
||||
}
|
||||
@@ -16,11 +15,9 @@ module.exports = {
|
||||
|
||||
if (setting === 'name') {
|
||||
const value = args.slice(1).join(' ');
|
||||
// Changer le pseudo du bot sur le serveur
|
||||
if (value) {
|
||||
try {
|
||||
const botMember = await message.guild.members.fetch(client.user.id);
|
||||
// Set the nickname for the bot member
|
||||
await botMember.setNickname(value);
|
||||
return message.reply(`Mon nouveau pseudo est maintenant **${value}**.`);
|
||||
} catch (error) {
|
||||
@@ -32,7 +29,6 @@ module.exports = {
|
||||
}
|
||||
} else if (setting === 'pic') {
|
||||
const value = args[1];
|
||||
// Changer l'avatar du bot
|
||||
if (value && value.startsWith('http')) {
|
||||
try {
|
||||
await client.user.setAvatar(value);
|
||||
|
||||
Reference in New Issue
Block a user