Use an environment to avoid crash between libraries
Docs:
https://python-telegram-bot.readthedocs.io/en/stable/
-
Update the commands in Telegram Father
-
Update the version each time the bot is updated
-
Update in Heroku
Wiki https://github.com/python-telegram-bot/python-telegram-bot/wiki
Code-snipperts https://github.com/python-telegram-bot/python-telegram-bot/wiki/Code-snippets
pip install python-telegram-bot[passport]
installs the cryptography library. Use this, if you want to use Telegram Passport related functionality.
pip install python-telegram-bot[ujson]
installs the ujson library. It will then be used for JSON de- & encoding, which can bring speed up compared to the standard json library.
pip install python-telegram-bot[socks]
installs the PySocks library. Use this, if you want to work behind a Socks5 server.
How to print pretty json https://stackoverflow.com/a/12944035/10942018
MAKRDOWN V2
Correct use:
https://stackoverflow.com/questions/62230148/python-telegram-bot-markdown
Oficial Docs:
https://core.telegram.org/bots/api#markdownv2-style
Emojis Supported by GitHub
https://gist.github.com/rxaviers/7360908
or If you are on Windows use:
Windows
+ .
👌
The time zones in the world https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
Test the bot in a local environment https://devcenter.heroku.com/articles/heroku-local
mexico = timezone('America/Mexico_City')
timeToExecute = time(hour=23, minute=30, tzinfo=mexico)
# NOTE: Validation if the chat corresponds to the group id send it.
# Import those libraries and check the repository...
from datetime import time
from pytz import timezone
#Handle the time in Mexico City
jobQueue.run_daily(daily_job, time=timeToExecute)
git push heroku main