mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-21 22:56:38 +01:00
Added pass_args=True since it is now needed
parent
500de45b0a
commit
6110c84138
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ def start_callback(update, context):
|
|||
|
||||
...
|
||||
|
||||
dispatcher.add_handler(CommandHandler("start", start_callback))
|
||||
dispatcher.add_handler(CommandHandler("start", start_callback, pass_args=True))
|
||||
```
|
||||
|
||||
Sending "/start Hello World!" to your bot will now split everything after /start separated by the space character into a list of words and pass it on to the `args` parameter of `context`: `["Hello", "World!"]`. We join these chunks together by calling `" ".join(context.args)` and echo the resulting string back to the user.
|
||||
|
|
Loading…
Reference in a new issue