K
K
Kirill Legend2020-05-21 12:17:49
Python
Kirill Legend, 2020-05-21 12:17:49

How to properly process commands for a VK bot in python?

How to properly process commands for a VK bot in python? There is processing of commands in one cycle But there are too many commands, which will probably cause friezes. Maybe create several modules and run such a cycle in each of them and process exactly those commands for which the module is responsible? for event in longpoll.listen():

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Yakushenko, 2020-05-21
@thelegend3553

Process all received events asynchronously, each condition has its own function, and there will be no problems.
At worst, if you can’t do it in async, throw processing into threads.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question