Advertisement
Guest User

Untitled

a guest
May 20th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. let antibots = JSON.parse(fs.readFileSync('./antibots.json' , 'utf8'));//require antihack.json file
  2. client.on('message', message => {
  3. if(message.content.startsWith(prefix + "antibots on")) {
  4. if(!message.channel.guild) return message.reply('**This Command Only For Servers**');
  5. if(!message.member.hasPermission('MANAGE_GUILD')) return message.channel.send('**Sorry But You Dont Have Permission** `MANAGE_GUILD`' );
  6. antibots[message.guild.id] = {
  7. onoff: 'On',
  8. }
  9. message.channel.send(`**โœ… The AntiBots Is __๐Ž๐__ !**`)
  10. fs.writeFile("./antibots.json", JSON.stringify(antibots), (err) => {
  11. if (err) console.error(err)
  12. .catch(err => {
  13. console.error(err);
  14. });
  15. });
  16. }
  17.  
  18. })
  19. //antihack with ON , OFF ! RARE CODE
  20. //LIKE PLUSBOT !
  21.  
  22.  
  23. client.on('message', message => {
  24. if(message.content.startsWith(prefix + "antibots off")) {
  25. if(!message.channel.guild) return message.reply('**This Command Only For Servers**');
  26. if(!message.member.hasPermission('MANAGE_GUILD')) return message.channel.send('**Sorry But You Dont Have Permission** `MANAGE_GUILD`' );
  27. antibots[message.guild.id] = {
  28. onoff: 'Off',
  29. }
  30. message.channel.send(`**โ›” The AntiBots Is __๐Ž๐…๐…__ !**`)
  31. fs.writeFile("./antibots.json", JSON.stringify(antibots), (err) => {
  32. if (err) console.error(err)
  33. .catch(err => {
  34. console.error(err);
  35. });
  36. });
  37. }
  38.  
  39. })
  40.  
  41. client.on("guildMemberAdd", member => {
  42. if(!antibots[member.guild.id]) antibots[member.guild.id] = {
  43. onoff: 'Off'
  44. }
  45. if(antibots[member.guild.id].onoff === 'Off') return;
  46. if(member.user.bot) return member.kick()
  47. })
  48.  
  49. fs.writeFile("./antibots.json", JSON.stringify(antibots), (err) => {
  50. if (err) console.error(err)
  51. .catch(err => {
  52. console.error(err);
  53. });
  54.  
  55. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement