From 4bd8544531036e0d1e9db29a6e0c4ca11848ffe4 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 27 May 2017 03:07:48 +0300 Subject: [PATCH] Fix message.get_command() and etc. --- aiogram/types/message.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/aiogram/types/message.py b/aiogram/types/message.py index 4c8ea295..56546c9b 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -156,12 +156,14 @@ class Message(Deserializable): return command, args def get_command(self): - command, _ = self.get_command() - return command + command = self.get_full_command() + if command: + return command[0] def get_args(self): - _, args = self.get_command() - return args.strip() + command = self.get_full_command() + if command: + return command[1].strip() async def reply(self, text, parse_mode=None, disable_web_page_preview=None, disable_notification=None, reply_markup=None) -> 'Message':