-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When TELEGRAM_DISABLE_COMMANDS is enabled Telegram notifier shouldn't register commands #440
Comments
Hi @dissidente. |
Hummm not sure if this is a false positive. A couple of days ago I changed the setting to false, and removed the commands from the bot, as I actually mainly use the bot for notifications, with tgtg as well. At the time the bot was left without a command list. Yesterday when I ran into my issue with upgrading the container, I actually made a copy of the container configuration and restored it at the side of the main one, just pointing to the previous container version. I checked the configuration and the setting was still false, so I found weird when I successfully started the container and then got the menu back. However, a few minutes ago, after having fixed my issue, and starting a new tgtg container, the menu didn't come back (with the setting as false, as it should), so... 🤷♂️ I see the telegram notifier was rebuilt. This might have been present on v1.17.1, which was the previous version I used to keep the notifier going while sorting the container upgrade issue. |
Shouldn't we just call https://docs.python-telegram-bot.org/en/v21.1.1/telegram.bot.html#telegram.Bot.delete_my_commands when the bot starts up with TELEGRAM_DISABLE_COMMANDS=false? |
When the ability to use commands for tgtg on Telegram notifier is disabled, the notifier should only be used to send notices on events, and should not register any tgtg-related commands (as they can't be used).
This is specially important when using a bot for multiple purposes, one of which receive tgtg notices without the intention of executing any commands to tgtg through the bot (hence the TELEGRAM_DISABLE_COMMANDS being enabled).
The text was updated successfully, but these errors were encountered: