更改echo.py中的handle_echo函数,增加类型注解
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user