mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2024-11-23 12:41:05 +08:00
改个名字
This commit is contained in:
parent
bdc7e3e3c3
commit
4656655017
|
@ -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