From ad3c2b6909a3e75945f686be8c7d78175ba20122 Mon Sep 17 00:00:00 2001 From: Egor Dementyev Date: Thu, 11 Jun 2020 20:21:55 +0300 Subject: [PATCH] Fix message.get_full_command() by JrooTJunior Co-authored-by: Alex Root Junior --- aiogram/types/message.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aiogram/types/message.py b/aiogram/types/message.py index 6ca0a27d..5956ccbe 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -168,7 +168,8 @@ class Message(base.TelegramObject): :return: tuple of (command, args) """ if self.is_command(): - cmd_args = self.text.split(maxsplit=1) + command, *args = self.text.split(maxsplit=1)'' + arg = args[0] if args else None command, args = cmd_args.pop(0), cmd_args.pop(0) if cmd_args else '' return command, args