From 6f11e681712eca7c228ffb339c139a6aff80099d Mon Sep 17 00:00:00 2001 From: omg-xtao <100690902+omg-xtao@users.noreply.github.com> Date: Tue, 5 Jul 2022 23:13:39 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=EF=B8=8F=20hotfix:=20get=20argumen?= =?UTF-8?q?ts=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagermaid/listener.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pagermaid/listener.py b/pagermaid/listener.py index 5c139d4..09e0c75 100644 --- a/pagermaid/listener.py +++ b/pagermaid/listener.py @@ -61,7 +61,7 @@ def listener(**args): else: block_process = True pattern = fr"^(,|,){alias_command(command, disallow_alias)}(?: |$)([\s\S]*)" - sudo_pattern = fr"^/{alias_command(command, disallow_alias)}(?: |$)([\s\S]*)" + sudo_pattern = fr"^(/){alias_command(command, disallow_alias)}(?: |$)([\s\S]*)" if pattern is not None and not pattern.startswith("(?i)"): args["pattern"] = f"(?i){pattern}" else: @@ -122,11 +122,11 @@ def listener(**args): try: try: - parameter = message.matches[0].group(1).split(" ") + parameter = message.matches[0].group(2).split(" ") if parameter == [""]: parameter = [] message.parameter = parameter - message.arguments = message.matches[0].group(1) + message.arguments = message.matches[0].group(2) except BaseException: message.parameter = None message.arguments = None