mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-16 20:23:32 +00:00
Update command.rst (#1470)
Fix rendition of the backslash in regular expressions
This commit is contained in:
parent
6ad287c329
commit
849482da1f
1 changed files with 2 additions and 2 deletions
|
|
@ -6,8 +6,8 @@ Usage
|
|||
=====
|
||||
|
||||
1. Filter single variant of commands: :code:`Command("start")`
|
||||
2. Handle command by regexp pattern: :code:`Command(re.compile(r"item_(\d+)"))`
|
||||
3. Match command by multiple variants: :code:`Command("item", re.compile(r"item_(\d+)"))`
|
||||
2. Handle command by regexp pattern: :code:`Command(re.compile(r"item_(\\d+)"))`
|
||||
3. Match command by multiple variants: :code:`Command("item", re.compile(r"item_(\\d+)"))`
|
||||
4. Handle commands in public chats intended for other bots: :code:`Command("command", ignore_mention=True)`
|
||||
5. Use :class:`aiogram.types.bot_command.BotCommand` object as command reference :code:`Command(BotCommand(command="command", description="My awesome command")`
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue