Answer the question
In order to leave comments, you need to log in
How to make a team opposite kick?
Good afternoon! There is a "kick" command in the bot. When you make a reply message and add the word kick, the bot kicks this person from the conversation. here is the code:
elseif($cmd == 'кикнуть'){
if($reply_author == ''){
$vk->sendMessage($peer_id, "@id{$id} ({$first_name}), вы не указали человека, которого нужно исключить (перешлите любое его сообщение)");
}else{
$userInfo_reply = $vk->request("users.get", ["user_ids" => $reply_author]);
$first_name_reply = $userInfo[0]['first_name'];
$vk->sendMessage($peer_id, "@id{$reply_author} ({$userinfo_reply}), прощайте");
$vk->request('messages.removeChatUser', ['chat_id' => $chat_id, 'member_id' => $reply_author]);
}
Answer the question
In order to leave comments, you need to log in
You need to find a function opposite to 'messages.removeChatUser' in the VK API documentation.
The code structure is the same.
If you write a bot on a page, then you can return users, but in PHP it will probably be more difficult to do, and not according to the rules.
And if the group is just a kick. Inviting anyone on behalf of the group is not and has never been possible. :|
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question