From b62b94fa15966b96b3cb9892be3851d5d380e67e Mon Sep 17 00:00:00 2001 From: uburuntu Date: Tue, 11 Aug 2020 15:09:04 +0300 Subject: [PATCH] ref: make command methods closer --- aiogram/types/message.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/aiogram/types/message.py b/aiogram/types/message.py index 311ed6ef..a02cb601 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -153,14 +153,6 @@ class Message(base.TelegramObject): return ContentType.UNKNOWN - def is_command(self) -> bool: - """ - Check message text is command - - :return: bool - """ - return self.text and self.text.startswith("/") - def is_forward(self) -> bool: """ Check that the message is forwarded. @@ -170,6 +162,14 @@ class Message(base.TelegramObject): """ return bool(self.forward_date) + def is_command(self) -> bool: + """ + Check message text is command + + :return: bool + """ + return self.text and self.text.startswith("/") + def get_full_command(self) -> typing.Optional[typing.Tuple[str, str]]: """ Split command and args