Fix message.get_full_command() (#352)

* Fix message.get_full_command()

* Fix message.get_full_command() by JrooTJunior

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>

* fix typos

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
This commit is contained in:
Egor Dementyev 2020-06-13 19:18:30 +03:00 committed by GitHub
parent 1389ca5874
commit 8d30c1dc1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -168,7 +168,8 @@ class Message(base.TelegramObject):
:return: tuple of (command, args)
"""
if self.is_command():
command, args = self.text.split(maxsplit=1)
command, *args = self.text.split(maxsplit=1)
args = args[0] if args else None
return command, args
def get_command(self, pure=False):