This commit is contained in:
shenjack 2024-09-24 23:44:56 +08:00
parent 28fe34dd1a
commit ba6ed96d90
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -154,8 +154,9 @@ def dispatch_msg(msg: ReciveMessage, client) -> None:
if msg.is_reply or msg.is_from_self: if msg.is_reply or msg.is_from_self:
return return
if msg.content == HELP_CMD: if msg.content == HELP_CMD:
client.send_message(msg.reply_with(HELP_MSG)) reply = msg.reply_with(HELP_MSG)
if msg.content.startswith(EVAL_CMD): client.send_message(reply)
elif msg.content.startswith(EVAL_CMD):
eval_fight(msg, client) eval_fight(msg, client)
elif msg.content.startswith(FIGHT_CMD): elif msg.content.startswith(FIGHT_CMD):
run_fights(msg, client) run_fights(msg, client)
@ -164,8 +165,8 @@ def dispatch_msg(msg: ReciveMessage, client) -> None:
elif msg.content.startswith(EVAL_SIMPLE_CMD): elif msg.content.startswith(EVAL_SIMPLE_CMD):
# 放在最后, 避免覆盖 前面的命令 # 放在最后, 避免覆盖 前面的命令
# 同时过滤掉别的 /namer-xxxxx # 同时过滤掉别的 /namer-xxxxx
if msg.content.find(" ") == -1: if msg.content.find(" ") != -1:
return eval_fight(msg, client)
def on_ica_message(msg: IcaNewMessage, client: IcaClient) -> None: def on_ica_message(msg: IcaNewMessage, client: IcaClient) -> None: