Answer the question
In order to leave comments, you need to log in
How to make the command kick by forwarded message or by nickname (id)?
vk.updates.hear(/^-kick/i, async (context) => {
var args = context.message.text.split(' ');
if(admins.indexOf(context.senderId) === -1) {
return false;
}
if(args[1]) {
const response2 = vk.api.messages.delete({
message_ids: context.id,
delete_for_all: 1
})
}
const response = vk.api.messages.removeChatUser({
chat_id: context.chatId,
user_id: args[1]
})
const response3 = vk.api.messages.send({
chat_id: context.chatId,
message: '@id' + context.senderId + ' Пользователь @id' + args[1] + ' Успешно кикнут из беседы!'
})
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question