Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client.on('message', async message => {
- if (!message.content.startsWith(prefix) || message.author.bot) return;
- const args = message.content.slice(prefix.length).trim().split(/ +/);
- const command = args.shift().toLowerCase();
- let user = message.mentions.members.first() || client.users.cache.find(u => u.id === args[0])
- let member = message.guild.member(user)
- if(command === "blacklist") {
- if(!message.member.hasPermission("MANAGE_GUILD")) return;
- if(!user) return message.channel.send('i cant find this user!')
- if(db.has(`u`,member.id)) return message.channel.send('this member already blacklisted!')
- db.set(`u`,member.id)
- message.channel.send('member added to blacklisted users!')
- }
- if(command === "remove-blacklist") {
- if(!message.member.hasPermission("MANAGE_GUILD")) return;
- if(!user) return message.channel.send('i cant find this user!')
- if(!db.has(`u`,member.id)) return message.channel.send('this member not blacklisted!')
- db.delete(`u`,member.id)
- message.channel.send('member removed from blacklisted users!')
- }
- if(command === 'delete-all') {
- if(!message.member.hasPermission("MANAGE_GUILD")) return;
- db.delete('u')
- message.channel.send('removed all blacklists')
- }
- });
- السطر اللي تحطه في كل اكوادك
- if(db.has("u", message.author.id)) return message.channel.send('you are blacklisted!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement