Help Command Behavior¶
django_telegram_app automatically sends a help message whenever
input is received that is not expected or understood.
After having completed the tutorial, the help message would be:
Intro Text¶
You can customize the introductory paragraph of this help message using the Django setting:
This text appears before the auto‑generated command list.
A blank line is automatically inserted after the intro.
Auto‑Generated Command List¶
The command list is generated from the autodiscovered Command
classes.
Each entry uses:
Excluding Commands¶
To hide a command from the help output, set exclude_from_help on your Command subclass:
| myapp/telegrambot/commands/concrete.py | |
|---|---|
Full Customization with HELP_TEXT_RENDERER¶
If you want complete control over the help message---including the command list---you can provide a custom renderer.
Set:
This must be a dotted path to a callable with the signature:
If HELP_TEXT_RENDERER is set, HELP_TEXT_INTRO is ignored entirely.