Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The following wonderful people contributed directly or indirectly to this projec
- `Avanatiker <https://github.com/Avanatiker>`_
- `Balduro <https://github.com/Balduro>`_
- `bimmlerd <https://github.com/bimmlerd>`_
- `Eli Gao <https://github.com/eligao>`_
- `ErgoZ Riftbit Vaper <https://github.com/ergoz>`_
- `franciscod <https://github.com/franciscod>`_
- `Jacob Bom <https://github.com/bomjacob>`_
Expand Down
5 changes: 3 additions & 2 deletions telegram/ext/commandhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ class CommandHandler(Handler):
pass_args (optional[bool]): If the handler should be passed the
arguments passed to the command as a keyword argument called `
``args``. It will contain a list of strings, which is the text
following the command split on spaces. Default is ``False``
following the command split on single or consecutive whitespace characters.
Default is ``False``
pass_update_queue (optional[bool]): If set to ``True``, a keyword argument called
``update_queue`` will be passed to the callback function. It will be the ``Queue``
instance used by the ``Updater`` and ``Dispatcher`` that contains new updates which can
Expand Down Expand Up @@ -80,7 +81,7 @@ def handle_update(self, update, dispatcher):
message = update.message or update.edited_message

if self.pass_args:
optional_args['args'] = message.text.split(' ')[1:]
optional_args['args'] = message.text.split()[1:]

return self.callback(dispatcher.bot, update, **optional_args)

Expand Down
5 changes: 3 additions & 2 deletions telegram/ext/stringcommandhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ class StringCommandHandler(Handler):
pass_args (optional[bool]): If the handler should be passed the
arguments passed to the command as a keyword argument called `
``args``. It will contain a list of strings, which is the text
following the command split on spaces. Default is ``False``
following the command split on single or consecutive whitespace characters.
Default is ``False``
pass_update_queue (optional[bool]): If set to ``True``, a keyword argument called
``update_queue`` will be passed to the callback function. It will be the ``Queue``
instance used by the ``Updater`` and ``Dispatcher`` that contains new updates which can
Expand Down Expand Up @@ -65,7 +66,7 @@ def handle_update(self, update, dispatcher):
optional_args = self.collect_optional_args(dispatcher)

if self.pass_args:
optional_args['args'] = update.split(' ')[1:]
optional_args['args'] = update.split()[1:]

return self.callback(dispatcher.bot, update, **optional_args)

Expand Down