S
S
Sss123p2020-09-08 02:02:09
Bots
Sss123p, 2020-09-08 02:02:09

Where can I see how many groups the telegram bot has been added to? And how to deactivate the bot in all groups so that it remains only in one?

Where can I see how many groups the bot has been added to? And how to deactivate the bot in all groups so that it remains only in one?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lesha, 2020-09-08
@hydrugz

Where can I see how many groups the bot has been added to?

Unfortunately, there are no ready-made solutions or methods to check which groups a bot is in (or at least the number) at the moment. But you can count the number of chat_id groups/supergroups.
Create a db. With each request, pull out the group ID and look for it in the database. If it's already there, go ahead, if not, add it. (You can also store the name, type, etc.)
how to deactivate the bot in all groups so that it remains only in one?

2. The same way with chat_id, only simpler: ignore if it does not match the one you (your group) specified

S
Sasha Sancho, 2020-09-08
@KPEBA

https://api.telegram.org/bot{token}/getUpdates
Might help.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question