Answer the question
In order to leave comments, you need to log in
Why such a user longpoll response?
When I try to display the response of user longpoll (and it is he who is needed, not bot), I get something different from what comes out if I use bot longpoll. Is that how it's meant to be, or am I doing something wrong?
Here is the code:
import vk_api
vk_session = vk_api.VkApi(token='токенчик')
from vk_api.longpoll import VkLongPoll, VkEventType
vk = vk_session.get_api()
longpoll = VkLongPoll(vk_session)
for event in longpoll.listen():
if event.type == VkEventType.MESSAGE_NEW:
print (event)
Answer the question
In order to leave comments, you need to log in
This is an old liba, low-level. Event - object therefore so writes. To see something interesting, use the debug mode or print(event.__dict__)
(like this)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question