P
P
Pavel Tsarenkov2022-02-16 11:29:06
Node.js
Pavel Tsarenkov, 2022-02-16 11:29:06

How to run one code for different users?

There is a telegram bot that conducts a quiz in a group. The bot has commands for managing the quiz (start and stop), as well as a rating system. Within the same group, the bot works perfectly. However, if the bot is added to another group, problems begin. For example, if the bot is simultaneously running in two groups, then if you use the "stop" command in one group, the bot will stop in two groups at once.

Question: How can I run one code separately for each group so that the control commands and the rating work only within the same group (even if the bot can be launched somewhere else)?

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