得了, 先禁用, 才意识到我啥api都没给

This commit is contained in:
shenjack 2024-02-26 06:10:57 +08:00
parent 14a3d6b3df
commit bdc7e3e3c3
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

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