summaryrefslogtreecommitdiff
path: root/ATRI/plugins/setu/__init__.py
diff options
context:
space:
mode:
authorLint Action <[email protected]>2022-02-03 06:58:54 +0000
committerLint Action <[email protected]>2022-02-03 06:58:54 +0000
commit9a4200dc5022e1bf5a8b3228fe18251e5255e573 (patch)
tree350c88b6e5757dce56c73f9003baca29022df23d /ATRI/plugins/setu/__init__.py
parent110c36b86b1dbd45b4f6e5dcda5654193a0f4fb0 (diff)
downloadATRI-9a4200dc5022e1bf5a8b3228fe18251e5255e573.tar.gz
ATRI-9a4200dc5022e1bf5a8b3228fe18251e5255e573.tar.bz2
ATRI-9a4200dc5022e1bf5a8b3228fe18251e5255e573.zip
:rotating_light: 自动进行代码格式化
Diffstat (limited to 'ATRI/plugins/setu/__init__.py')
-rw-r--r--ATRI/plugins/setu/__init__.py12
1 files changed, 8 insertions, 4 deletions
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()