改个名字

This commit is contained in:
shenjack 2024-02-26 06:11:17 +08:00
parent bdc7e3e3c3
commit 4656655017
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -71,10 +71,10 @@ def safe_eval(code: str, msg: NewMessage) -> str:
return result
# def on_message(message: NewMessage, client: IcaClient) -> None:
# if not (message.is_from_self or message.is_reply):
# if message.content.startswith("/="):
# code = message.content[2:]
# result = safe_eval(code, message)
# reply = message.reply_with(result)
# client.send_message(reply)
def on_message(message: NewMessage, client: IcaClient) -> None:
if not (message.is_from_self or message.is_reply):
if message.content.startswith("/="):
code = message.content[2:]
result = safe_eval(code, message)
reply = message.reply_with(result)
client.send_message(reply)