mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 18:19:34 +00:00
Fix message.get_command() and etc.
This commit is contained in:
parent
5e93656b7a
commit
4bd8544531
1 changed files with 6 additions and 4 deletions
|
|
@ -156,12 +156,14 @@ class Message(Deserializable):
|
||||||
return command, args
|
return command, args
|
||||||
|
|
||||||
def get_command(self):
|
def get_command(self):
|
||||||
command, _ = self.get_command()
|
command = self.get_full_command()
|
||||||
return command
|
if command:
|
||||||
|
return command[0]
|
||||||
|
|
||||||
def get_args(self):
|
def get_args(self):
|
||||||
_, args = self.get_command()
|
command = self.get_full_command()
|
||||||
return args.strip()
|
if command:
|
||||||
|
return command[1].strip()
|
||||||
|
|
||||||
async def reply(self, text, parse_mode=None, disable_web_page_preview=None,
|
async def reply(self, text, parse_mode=None, disable_web_page_preview=None,
|
||||||
disable_notification=None, reply_markup=None) -> 'Message':
|
disable_notification=None, reply_markup=None) -> 'Message':
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue