J-Rios / TLG_JoinCaptchaBot

Telegram Bot to verify if users joining a group are human. The Bot sends an image captcha for each new user and kicks any of them who can't solve the captcha in a specified time.
GNU General Public License v3.0
515 stars 217 forks source link

[Request] Add a /mychats command to list groups to connect on private #147

Open uduntuntu opened 2 years ago

uduntuntu commented 2 years ago

it could be easier to configure chat options if the bot could tell which groups it belongs. Maybe using buttons.

We have self deployed bot.

e.g.

/mychats
Bot: My groups: 
<Group 1 real name> id: <chat id> 
<Group 2 real name> id: <chat id> 
<Group 3 real name> id: <chat id> 
<Group 4 real name> id: <chat id> 

/connect <id>
/checkcfg
/connect <id 2>
/checkcfg
/disconnect all
J-Rios commented 2 years ago

Hi,

Sorry for late response I was a bit busy.

This request is not simple, because the Bot didn't store any information regarding users of a group, neither Admins of a group, so there is no possible to do this request without storing this information on some way first.

One of the main problematic of that is that it have an impact on Bot response time due scalability if we get this information by requesting group information from Telegram Server, so a better approach to make this is to check if Telegram API offers some way of subscription to any kind of group admins modification event, maybe the members change status event (need to tbe checked on Telegram API information).

Currently I don't have enough motivation to do this request, but I keep it open for anyone that wants to contribute.

Regards.

J-Rios commented 2 years ago

Info for users of the Bot: current way of getting the Chat ID of a group is using the /chatid command inside a group.