更改echo.py中的handle_echo函数,增加类型注解

This commit is contained in:
baby20162016
2026-01-01 01:22:45 +08:00
parent 95c355a9df
commit 9146ffbb1a

View File

@@ -1,9 +1,12 @@
from core.command_manager import matcher
from ..core.ws import WS
from ..models.event import Event
# TODO 把该死的这些给抽象化
@matcher.command("echo")
async def handle_echo(bot, event, args):
async def handle_echo(bot: WS, event: Event, args: list[str]):
if not args:
reply_msg = "请在指令后输入要回复的内容,例如:/echo 你好"
else: