SHARE
TWEET

Untitled

a guest Sep 16th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. bot.on("message", (message) => {
  2.     if (message.content.startsWith(prefix + 'ban')) {
  3.  
  4.       if(! message.member.hasPermission('ADMINISTRATOR')) {
  5.         return message.reply("Tu n'as pas la permission administrateur .")
  6.     }
  7.  
  8.         var member = message.mentions.members.first();
  9.         member.ban().then((member) => {
  10.             message.channel.send("👋 " + member.displayName + " as bien été bannis 👉 ");
  11.         }).catch(() => {
  12.             message.channel.send("Je n'ai pas les bonnes permissions !");
  13.         });
  14.     }
  15. });
  16.  
  17.  
  18.  if(message.content.startsWith(prefix + 'kick')) {
  19.  
  20.     if(!message.member.hasPermission('ADMINISTRATOR')
  21.     return message.reply("Vous n avez pas la permission ADMINISTRATEUR")
  22.      }
  23.  
  24. let member = message.mentions.users.first()
  25.  
  26. let reason = message.content.trim().slice(22)
  27.  
  28. if(!reason) return message.reply('Veuillez preciser une raison !')
  29.  
  30. member.kick(reason)
  31.  
  32. message.channel.send(`${member.username} a été kick avec succès :white_check_mark: !`).then(member.send(`Vous avez été kick du serveur: ${message.guild.name} par: ${message.author.username} pour la raison: ${reason}`)
  33.   }
  34. })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top