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
532 stars 218 forks source link

[Request] Add Heroku deploy support #165

Closed kucingpulung closed 11 months ago

J-Rios commented 1 year ago

I have made some changes in the code to avoid any need to modify the joincaptchabot.py file.

Now, the setup to use Heroku should only require to modify the next configurations in the settings.py file (or provide it as environment variables):

# Bot Webhook Host address
"CAPTCHABOT_WEBHOOK_HOST": "https://<appname>.herokuapp.com/",

# Bot Webhook Host Port
"CAPTCHABOT_WEBHOOK_PORT": os_environ.get("PORT", "80"),

# Bot Webhook Certificate (must be None for Heroku)
"CAPTCHABOT_WEBHOOK_CERT" : None,

# Bot Webhook Certificate private key (must be None for Heroku)
"CAPTCHABOT_WEBHOOK_CERT_PRIV_KEY" : None,

# Optionally, to verify request from Telegram Server
# (don't use the Bot Token, for security reason it must be other)
"CAPTCHABOT_WEBHOOK_SECRET_TOKEN" : None,

Best Regard :)

J-Rios commented 1 year ago

Folow this support in next discussion:

https://github.com/J-Rios/TLG_JoinCaptchaBot/discussions/182