Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const db = require('quick.db')//npm install quick.db
- client.on('message', message => {
- if (!message.content.startsWith(prefix) || message.author.bot) return;
- const args = message.content.slice(prefix.length).trim().split(/ +/);
- const command = args.shift().toLowerCase();
- if(command === 'antibots-on') {
- if(!message.member.hasPermission('KICK_MEMBERS')) return;
- message.channel.send('antibots is **on**')
- db.set(message.guild.id + "on", 'true')
- }
- if(command === 'antibots-off') {
- if(!message.member.hasPermission('KICK_MEMBERS')) return;
- message.channel.send('antibots is **off**')
- db.delete(message.guild.id + "on")
- }
- });
- client.on('guildMemberAdd', (member) => {
- if(db.has(member.guild.id + "on")) {
- if(member.user.bot) {
- member.kick();
- }}
- });
Advertisement
Add Comment
Please, Sign In to add comment