kopia lustrzana https://github.com/J-Rios/TLG_JoinCaptchaBot
Merge branch 'master' into public-limited
commit
b613113f41
|
@ -10,9 +10,9 @@ Author:
|
||||||
Creation date:
|
Creation date:
|
||||||
09/09/2018
|
09/09/2018
|
||||||
Last modified date:
|
Last modified date:
|
||||||
22/05/2024
|
06/07/2024
|
||||||
Version:
|
Version:
|
||||||
1.31.1
|
1.31.2
|
||||||
'''
|
'''
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -348,6 +348,20 @@ CONST = {
|
||||||
"\nUkrainian / Українську\n/language uk\n" \
|
"\nUkrainian / Українську\n/language uk\n" \
|
||||||
"\nUzbek / o'zbek\n/language uz\n",
|
"\nUzbek / o'zbek\n/language uz\n",
|
||||||
|
|
||||||
|
# Privacy information
|
||||||
|
"PRIVACY": \
|
||||||
|
"Privacy Information:\n" \
|
||||||
|
"————————————————\n" \
|
||||||
|
"This Bot doesn't store any data from users, but it stores some " \
|
||||||
|
"group information (the group ID and Title).\n"
|
||||||
|
"\n" \
|
||||||
|
"In order to work and check for user captcha solve responses, " \
|
||||||
|
"the Bot needs to receive any message published in the group. The " \
|
||||||
|
"content of the messages are only used to check if it contains the " \
|
||||||
|
"captcha resolution. Once check is done, the message is discarded. " \
|
||||||
|
"Messages from users that are not involved into a captcha process " \
|
||||||
|
"are directly ignored and discarded.\n",
|
||||||
|
|
||||||
# Bot developer
|
# Bot developer
|
||||||
"DEVELOPER": "@JoseTLG",
|
"DEVELOPER": "@JoseTLG",
|
||||||
|
|
||||||
|
@ -358,7 +372,7 @@ CONST = {
|
||||||
"DEV_DONATION_ADDR": "https://ko-fi.com/joincaptchabot",
|
"DEV_DONATION_ADDR": "https://ko-fi.com/joincaptchabot",
|
||||||
|
|
||||||
# Bot version
|
# Bot version
|
||||||
"VERSION": "1.31.1 (22/05/2024)"
|
"VERSION": "1.31.2 (06/07/2024)"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Supported languages list
|
# Supported languages list
|
||||||
|
@ -422,6 +436,7 @@ CMD = {
|
||||||
"CHATID": {"KEY": "chatid"},
|
"CHATID": {"KEY": "chatid"},
|
||||||
"VERSION": {"KEY": "version"},
|
"VERSION": {"KEY": "version"},
|
||||||
"ABOUT": {"KEY": "about"},
|
"ABOUT": {"KEY": "about"},
|
||||||
|
"PRIVACY": {"KEY": "privacy"},
|
||||||
"CAPTCHA": {"KEY": "captcha"},
|
"CAPTCHA": {"KEY": "captcha"},
|
||||||
"ALLOWUSERLIST": {"KEY": "allowuserlist"},
|
"ALLOWUSERLIST": {"KEY": "allowuserlist"},
|
||||||
"ALLOWGROUP": {"KEY": "allowgroup"},
|
"ALLOWGROUP": {"KEY": "allowgroup"},
|
||||||
|
|
|
@ -13,9 +13,9 @@ Author:
|
||||||
Creation date:
|
Creation date:
|
||||||
09/09/2018
|
09/09/2018
|
||||||
Last modified date:
|
Last modified date:
|
||||||
19/05/2024
|
06/07/2024
|
||||||
Version:
|
Version:
|
||||||
1.31.0
|
1.31.2
|
||||||
'''
|
'''
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -3544,6 +3544,17 @@ async def cmd_about(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
||||||
topic_id=tlg_get_msg_topic(update_msg))
|
topic_id=tlg_get_msg_topic(update_msg))
|
||||||
|
|
||||||
|
|
||||||
|
async def cmd_privacy(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
||||||
|
'''
|
||||||
|
Command /privacy handler.
|
||||||
|
'''
|
||||||
|
msg = getattr(update, "message", None)
|
||||||
|
if msg is None:
|
||||||
|
return
|
||||||
|
await tlg_send_msg(context.bot, msg.chat_id, CONST["PRIVACY"],
|
||||||
|
topic_id=tlg_get_msg_topic(msg))
|
||||||
|
|
||||||
|
|
||||||
async def cmd_captcha(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
async def cmd_captcha(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
||||||
'''
|
'''
|
||||||
Command /captcha message handler. Useful to test.
|
Command /captcha message handler. Useful to test.
|
||||||
|
@ -3979,6 +3990,7 @@ def tlg_app_setup(token: str) -> Application:
|
||||||
tlg_add_cmd(app, CMD["CHATID"]["KEY"], cmd_chatid)
|
tlg_add_cmd(app, CMD["CHATID"]["KEY"], cmd_chatid)
|
||||||
tlg_add_cmd(app, CMD["VERSION"]["KEY"], cmd_version)
|
tlg_add_cmd(app, CMD["VERSION"]["KEY"], cmd_version)
|
||||||
tlg_add_cmd(app, CMD["ABOUT"]["KEY"], cmd_about)
|
tlg_add_cmd(app, CMD["ABOUT"]["KEY"], cmd_about)
|
||||||
|
tlg_add_cmd(app, CMD["PRIVACY"]["KEY"], cmd_privacy)
|
||||||
if CONST["BOT_OWNER"] != "XXXXXXXXX":
|
if CONST["BOT_OWNER"] != "XXXXXXXXX":
|
||||||
tlg_add_cmd(app, CMD["CAPTCHA"]["KEY"], cmd_captcha)
|
tlg_add_cmd(app, CMD["CAPTCHA"]["KEY"], cmd_captcha)
|
||||||
tlg_add_cmd(app, CMD["ALLOWUSERLIST"]["KEY"], cmd_allowuserlist)
|
tlg_add_cmd(app, CMD["ALLOWUSERLIST"]["KEY"], cmd_allowuserlist)
|
||||||
|
|
|
@ -30,6 +30,7 @@ wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/lang
|
||||||
wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/pl.json
|
wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/pl.json
|
||||||
wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/pt_br.json
|
wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/pt_br.json
|
||||||
wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/ru.json
|
wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/ru.json
|
||||||
|
wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/sr.json
|
||||||
wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/sk.json
|
wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/sk.json
|
||||||
wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/tr.json
|
wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/tr.json
|
||||||
wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/uk.json
|
wget https://raw.githubusercontent.com/J-Rios/TLG_JoinCaptchaBot/master/src/language/uk.json
|
||||||
|
|
Ładowanie…
Reference in New Issue