Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let antibots = JSON.parse(fs.readFileSync('./antibots.json' , 'utf8'));//require antihack.json file
- client.on('message', message => {
- if(message.content.startsWith(prefix + "antibots on")) {
- if(!message.channel.guild) return message.reply('**This Command Only For Servers**');
- if(!message.member.hasPermission('MANAGE_GUILD')) return message.channel.send('**Sorry But You Dont Have Permission** `MANAGE_GUILD`' );
- antibots[message.guild.id] = {
- onoff: 'On',
- }
- message.channel.send(`**โ The AntiBots Is __๐๐__ !**`)
- fs.writeFile("./antibots.json", JSON.stringify(antibots), (err) => {
- if (err) console.error(err)
- .catch(err => {
- console.error(err);
- });
- });
- }
- })
- //antihack with ON , OFF ! RARE CODE
- //LIKE PLUSBOT !
- client.on('message', message => {
- if(message.content.startsWith(prefix + "antibots off")) {
- if(!message.channel.guild) return message.reply('**This Command Only For Servers**');
- if(!message.member.hasPermission('MANAGE_GUILD')) return message.channel.send('**Sorry But You Dont Have Permission** `MANAGE_GUILD`' );
- antibots[message.guild.id] = {
- onoff: 'Off',
- }
- message.channel.send(`**โ The AntiBots Is __๐๐ ๐ __ !**`)
- fs.writeFile("./antibots.json", JSON.stringify(antibots), (err) => {
- if (err) console.error(err)
- .catch(err => {
- console.error(err);
- });
- });
- }
- })
- client.on("guildMemberAdd", member => {
- if(!antibots[member.guild.id]) antibots[member.guild.id] = {
- onoff: 'Off'
- }
- if(antibots[member.guild.id].onoff === 'Off') return;
- if(member.user.bot) return member.kick()
- })
- fs.writeFile("./antibots.json", JSON.stringify(antibots), (err) => {
- if (err) console.error(err)
- .catch(err => {
- console.error(err);
- });
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement