mirror of
https://github.com/TriM-Organization/LiteyukiBot-TriM.git
synced 2024-11-11 01:27:29 +08:00
😢参数……
This commit is contained in:
parent
3955a7eb00
commit
0cb38d8ce7
@ -2,6 +2,7 @@ import asyncio
|
|||||||
from asyncio import TimerHandle
|
from asyncio import TimerHandle
|
||||||
from typing import Any, Dict
|
from typing import Any, Dict
|
||||||
|
|
||||||
|
import nonebot
|
||||||
from nonebot import on_regex, require, on_command
|
from nonebot import on_regex, require, on_command
|
||||||
from nonebot.matcher import Matcher
|
from nonebot.matcher import Matcher
|
||||||
from nonebot.params import RegexDict
|
from nonebot.params import RegexDict
|
||||||
@ -169,13 +170,13 @@ def set_timeout(matcher: Matcher, user_id: str, timeout: float = 300):
|
|||||||
|
|
||||||
@handle.handle()
|
@handle.handle()
|
||||||
async def _(
|
async def _(
|
||||||
|
result: Arparma,
|
||||||
matcher: Matcher,
|
matcher: Matcher,
|
||||||
user_id: UserId,
|
user_id: UserId,
|
||||||
strict: Query[bool] = AlconnaQuery("strict.value", False),
|
|
||||||
hard: Query[bool] = AlconnaQuery("hard.value", False),
|
|
||||||
):
|
):
|
||||||
is_strict = handle_config.handle_strict_mode or strict.result
|
nonebot.logger.info(result.options)
|
||||||
idiom, explanation = random_idiom(hard.result)
|
is_strict = handle_config.handle_strict_mode or result.options["strict"].value
|
||||||
|
idiom, explanation = random_idiom(result.options["hard"].value)
|
||||||
game = Handle(idiom, explanation, strict=is_strict)
|
game = Handle(idiom, explanation, strict=is_strict)
|
||||||
|
|
||||||
games[user_id] = game
|
games[user_id] = game
|
||||||
|
Loading…
Reference in New Issue
Block a user