mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2024-11-23 12:41:05 +08:00
得了, 先禁用, 才意识到我啥api都没给
This commit is contained in:
parent
14a3d6b3df
commit
bdc7e3e3c3
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user