P
P
Pavel2019-10-17 23:19:32
Python
Pavel, 2019-10-17 23:19:32

How to wait for a message from the vk_api user?

I know that for the bot in the cart there is a register_next_step_handler() method. But for VK I did not find such a method. Maybe have a crutch. I want that after a certain message it goes to another function, and so on.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
noob222, 2019-10-24
@noob222

module vk_api
for event in longpoll.listen():
if event.type == VkEventType.MESSAGE_NEW:
….

V
vkulik79, 2019-11-05
@vkulik79

for event in longpoll.listen() catches all events and writes them to event

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question