I
I
irtll2021-01-25 01:09:43
Python
irtll, 2021-01-25 01:09:43

The exit event from the vk api conversation does not come. What is the problem?

nothing comes to the longpoll if the user enters/leaves the conversation by himself or if he is kicked by the bot. conversation_message_id changes and the event can be requested via getByConversationMessageId. If you exclude / invite the user manually, then the event comes.

import vk_api
from vk_api.bot_longpoll import VkBotLongPoll, VkBotEventType
token = "123"
authorize = vk_api.VkApi(token=token)
getting_api = authorize.get_api()
longpoll = VkBotLongPoll(authorize, group_id=123)
for event in longpoll.listen():
    print(event)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question