From 0adeba70b28fea46d37e3f1985774cf383c43adb Mon Sep 17 00:00:00 2001 From: NanakoOfficial <712111161@qq.com> Date: Wed, 12 Jul 2023 23:44:40 +0800 Subject: [PATCH] Update __init__.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复正则 --- nonebot_plugin_randomtkk/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nonebot_plugin_randomtkk/__init__.py b/nonebot_plugin_randomtkk/__init__.py index f5b8675..f941b2e 100644 --- a/nonebot_plugin_randomtkk/__init__.py +++ b/nonebot_plugin_randomtkk/__init__.py @@ -4,7 +4,7 @@ from nonebot.adapters.onebot.v11 import (GroupMessageEvent, Message, MessageEvent, MessageSegment) from nonebot.matcher import Matcher -from nonebot.params import CommandArg, Depends, RegexMatched +from nonebot.params import CommandArg, Depends, RegexStr from nonebot.plugin import PluginMetadata from nonebot.rule import Rule @@ -67,7 +67,7 @@ def characs_check(event: MessageEvent) -> bool: @random_tkk.handle() -async def _(matcher: Matcher, event: MessageEvent, matched: str = RegexMatched()): +async def _(matcher: Matcher, event: MessageEvent, matched: str = RegexStr()): uid: str = str(event.user_id) gid: str = "" level: str = "" @@ -111,7 +111,7 @@ async def _(matcher: Matcher, event: MessageEvent, matched: str = RegexMatched() @random_tkk_default.handle() -async def _(matcher: Matcher, event: MessageEvent, matched: str = RegexMatched()): +async def _(matcher: Matcher, event: MessageEvent, matched: str = RegexStr()): if matched[-2:] == "帮助": await matcher.finish(__randomtkk_usages__) @@ -181,7 +181,7 @@ async def _(event: MessageEvent, pos: List[int] = Depends(get_user_guess)): @surrender_tkk.handle() -async def _(matcher: Matcher, event: MessageEvent, matched: str = RegexMatched()): +async def _(matcher: Matcher, event: MessageEvent, matched: str = RegexStr()): arg: str = matched[3:] if isinstance(event, GroupMessageEvent):