修复成语接龙
This commit is contained in:
@ -1,22 +1,18 @@
|
||||
import asyncio as asynkio
|
||||
import base64
|
||||
from pathlib import Path
|
||||
import secrets
|
||||
import json
|
||||
import datetime
|
||||
from typing import Literal, Optional
|
||||
import json
|
||||
import secrets
|
||||
from enum import Enum
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from loguru import logger
|
||||
from nonebot import on_message
|
||||
from nonebot.adapters import Event as BaseEvent
|
||||
from nonebot.adapters.console.event import MessageEvent as ConsoleMessageEvent
|
||||
from nonebot.adapters.discord.event import MessageEvent as DiscordMessageEvent
|
||||
from nonebot_plugin_alconna import (
|
||||
Alconna,
|
||||
Args,
|
||||
Field,
|
||||
Subcommand,
|
||||
UniMessage,
|
||||
UniMsg,
|
||||
on_alconna,
|
||||
@ -360,8 +356,10 @@ evt = on_alconna(
|
||||
|
||||
|
||||
@evt.handle()
|
||||
async def force_play_game(event: BaseEvent, rounds: Optional[int] = 100):
|
||||
await play_game(event, force=True, rounds=rounds)
|
||||
async def force_play_game(
|
||||
event: BaseEvent, target: DepLongTaskTarget, rounds: Optional[int] = 100
|
||||
):
|
||||
await play_game(event, target, force=True, rounds=rounds)
|
||||
|
||||
|
||||
async def end_game(event: BaseEvent, group_id: str):
|
||||
@ -518,4 +516,3 @@ async def _(event: BaseEvent, target: DepLongTaskTarget):
|
||||
group_id = target.channel_id
|
||||
remove_banned_id(group_id)
|
||||
await evt.send(await UniMessage().text("本群已开启成语接龙功能!").export())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user