Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cmd.hear(/^(?:!удалить игрока)\s([0-9]+)$/i, async (message, bot) => {
- message.user.foolder += 1;
- let user = users.find(x=> x.uid === Number(message.args[1]));
- if(user.uid == 0) return bot(`че каво?`);
- if(!user) return bot(`неверный ID игрока`);
- if(user.uid === message.user.uid) return bot(`м-да... для этого есть другая команда`);
- if(message.user.right < 3) return bot(`доступ запрещён.`)
- if(user.ban == true) {
- delete users.push({})
- }else{
- if(user.ban == false) return bot(`не могу удалить игрока, он не заблокирован!`)
- }
- vk.api.messages.send({user_id: user.id, message: `Ваш аккаунт удаляют, прощайте, Вы не сможете теперь пользоваться ботом!` });
- return bot(`готово!`);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement