diff --git a/ica-rs/plugins/save_eval.py b/ica-rs/plugins/save_eval.pyi similarity index 88% rename from ica-rs/plugins/save_eval.py rename to ica-rs/plugins/save_eval.pyi index d44fd3c..e4fb333 100644 --- a/ica-rs/plugins/save_eval.py +++ b/ica-rs/plugins/save_eval.pyi @@ -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)