Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update __init__.py #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions nonebot_plugin_randomtkk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 = ""
Expand Down Expand Up @@ -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__)

Expand Down Expand Up @@ -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):
Expand Down