From 9a4200dc5022e1bf5a8b3228fe18251e5255e573 Mon Sep 17 00:00:00 2001 From: Lint Action Date: Thu, 3 Feb 2022 06:58:54 +0000 Subject: =?UTF-8?q?:rotating=5Flight:=20=E8=87=AA=E5=8A=A8=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E4=BB=A3=E7=A0=81=E6=A0=BC=E5=BC=8F=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/plugins/setu/__init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'ATRI/plugins/setu/__init__.py') diff --git a/ATRI/plugins/setu/__init__.py b/ATRI/plugins/setu/__init__.py index 6c135aa..ee2fc6c 100644 --- a/ATRI/plugins/setu/__init__.py +++ b/ATRI/plugins/setu/__init__.py @@ -23,7 +23,9 @@ random_setu = Setu().on_command( @random_setu.handle() -async def _random_setu(bot: Bot, event: MessageEvent, matcher: Matcher, args: Message = CommandArg()): +async def _random_setu( + bot: Bot, event: MessageEvent, matcher: Matcher, args: Message = CommandArg() +): user_id = event.get_user_id() if not _setu_flmt.check(user_id): await random_setu.finish() @@ -49,6 +51,7 @@ async def _random_setu(bot: Bot, event: MessageEvent, matcher: Matcher, args: Me if msg: matcher.set_arg("r_rush_after_think", args) + @random_setu.got("r_rush_after_think") async def _(think: str = ArgPlainText("r_rush_after_think")): is_repo = will_think(think) @@ -58,12 +61,13 @@ async def _(think: str = ArgPlainText("r_rush_after_think")): await random_setu.finish(is_repo) - tag_setu = Setu().on_regex(r"来[张点丶份](.*?)的[涩色🐍]图", "根据提供的tag查找涩图") @tag_setu.handle() -async def _tag_setu(bot: Bot, event: MessageEvent, matcher: Matcher, args: Message = CommandArg()): +async def _tag_setu( + bot: Bot, event: MessageEvent, matcher: Matcher, args: Message = CommandArg() +): user_id = event.get_user_id() if not _setu_flmt.check(user_id): await random_setu.finish() @@ -247,7 +251,7 @@ _again_repo = ["没了...", "自己找去"] def will_think(msg: str) -> str: if msg in _ag_l: return str() - + ag_jud = re.findall(_ag_patt, msg) if ag_jud: return str() -- cgit v1.2.3