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

[Question] can you do more detailed documentation? #151

Closed f242 closed 2 years ago

f242 commented 2 years ago
# Initial new users just allow to send text messages
"CAPTCHABOT_INIT_RESTRICT_NON_TEXT_MSG": 0,

what means 0? max lengh of text message? or its 1 enable and 0 disable?

# Initial users send URLs enable/disable at Bot start
"CAPTCHABOT_INIT_URL_ENABLE": True,

it is antispam for messages with hyperlinks from new members? users who solved captcha can send hyperlinks without restriction?

about the content of the allowedgroups.txt file, how to fill it correctly? 1618685071, 1618685072, etc or 1618685071; 1618685072; or or something else

J-Rios commented 2 years ago

Regarding doing detailed documentation: I wish I had enough motivation to spend time on doing some wiki or better documentation, however I don't have it right now :(

Disclaimer: In general, the settings file just allows to specify default values, but the configuration of the Bot on a group is some kind self-explainatory when you check the /help and /commands in Telegram.

Regarding what means the values of "CAPTCHABOT_INIT_RESTRICT_NON_TEXT_MSG": Checking the code to know it purpouse (cause I don't remember it), this setting is the default value to apply in "Restrict_Non_Text" attribute for groups configurations, where 0 means not apply any restriction to send non-text message (images, stickers, voice, viedoa, etc.) on new members of the group, 1 means apply restriction to deny a new user send non-text messages for 1 day, and 2 means apply the restriction forever. You can configure that to any group from Telegram command /restrict_non_text. The information about this from /commands:

/restrict_non_text - After a new user solves the captha, apply a restriction to don't let them send non-text messages (images, videos, audios) for 1 day (or forever, using "forever" keyword).

For "CAPTCHABOT_INIT_URL_ENABLE", it is the default value of "URL_Enabled" group configuration attribute. This is the enable/disable of antispam that deny members of a group to send URLs, it apply to all members of the groups (not just the new members). The commands to configure this in a group are /url_enable and /url_disable. ANd from the /commands information:

/url_enable - Allows members of the group to send messages that contains links to websites (URLs).

/url_disable - Deny members of the group to send messages that contains links to websites (URLs).

Regarding the file allowedgroups.txt, it is populate by the Bot itself when you use the command /allowgroup, you don't need to modify it manually. An example of usage should be something like: /allowgroup add -1618685071

Regards.

f242 commented 2 years ago

thx