M
M
MalikDeveloper20772020-04-20 16:31:09
Python
MalikDeveloper2077, 2020-04-20 16:31:09

Python vk_api. How to catch the events of a person leaving the conversation and kick him?

I use vk_api.longpool

def main_loop(self) -> None:
        for event in self.longpoll.listen():
            # Как то сделать проверку на выход из беседы
            # И потом кикать через removeChatUser как я понял


How to catch this event and kick the one who left the conversation?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2020-05-17
@MalikDeveloper2077

actually it is possible and I have already implemented it

kick someone who left the conversation?

Kik implies that we remove the participant from the chat, temporarily.
As a rule, after that he can calmly enter back.
If it is necessary that he no longer return, then this is called a ban .
You can combine these two operations, then we get a kick + ban.
Now again: how can you kick someone who is not in the chat at the moment ?
No way.
That is, the answer to this question is: it is impossible.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question