From 849482da1f05f9e007d570312cb85ec8f7868fa6 Mon Sep 17 00:00:00 2001 From: Alexey Leshchenko Date: Wed, 24 Apr 2024 22:38:26 +0300 Subject: [PATCH] Update command.rst (#1470) Fix rendition of the backslash in regular expressions --- docs/dispatcher/filters/command.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/dispatcher/filters/command.rst b/docs/dispatcher/filters/command.rst index 00fe83c3..171e659b 100644 --- a/docs/dispatcher/filters/command.rst +++ b/docs/dispatcher/filters/command.rst @@ -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")`