diff --git a/ica-rs/Cargo.toml b/ica-rs/Cargo.toml index 5fc4013..bbcd7e1 100644 --- a/ica-rs/Cargo.toml +++ b/ica-rs/Cargo.toml @@ -24,7 +24,7 @@ version = "0.20.2" # features = ["auto-initialize"] [patch.crates-io] -rust_socketio = { path = "../../../rust-socketio/socketio" } +rust_socketio = { path = "D:/githubs/rust-socketio/socketio" } [build-dependencies] diff --git a/ica-rs/build.rs b/ica-rs/build.rs index ef5b948..8c3a548 100644 --- a/ica-rs/build.rs +++ b/ica-rs/build.rs @@ -1,5 +1,6 @@ use std::env; +#[allow(unused)] // 指定 pyo3 的绑定对象 fn pyo3_config() { // PYO3_PYTHON=xxxx @@ -16,5 +17,5 @@ fn pyo3_config() { } fn main() { - pyo3_config(); + // pyo3_config(); } diff --git a/ica-rs/src/py.rs b/ica-rs/src/py.rs index 6d39351..42af08f 100644 --- a/ica-rs/src/py.rs +++ b/ica-rs/src/py.rs @@ -1,14 +1,14 @@ // use inline_python::{python, Context}; -use pyo3::prelude::*; +// use pyo3::prelude::*; -#[pyclass] -#[pyo3(name = "BotStatus")] -pub struct BotStatusPy {} +// #[pyclass] +// #[pyo3(name = "BotStatus")] +// pub struct BotStatusPy {} -pub fn run() { +// pub fn run() { // -} +// } // pub fn run() { // let con: Context = python! { diff --git a/main.py b/main.py index 5f52db0..ea82f42 100644 --- a/main.py +++ b/main.py @@ -4,9 +4,9 @@ import argparse # from lib_not_dr.types import Options from lib_not_dr.loggers import config -from data_struct import SendMessage, ReplyMessage, get_config, BotConfig, BotStatus +from data_struct import get_config, BotConfig, BotStatus -_version_ = "0.3.0" +_version_ = "0.3.1" logger = config.get_logger("bot") @@ -18,7 +18,7 @@ if __name__ == "__main__": # --debug # --config=config.toml # -n --no-notice - parser = argparse.ArgumentParser() + parser = argparse.ArgumentParser(description=f"icalingua bot v{_version_}") parser.add_argument("-d", "--debug", action="store_true") parser.add_argument("-n", "--no-notice", action="store_true") parser.add_argument("-c", "--config", type=str) diff --git a/plugins/safe_eval.py b/plugins/safe_eval.py index 2612c86..a5ff544 100644 --- a/plugins/safe_eval.py +++ b/plugins/safe_eval.py @@ -39,11 +39,11 @@ def safe_eval(code: str) -> str: "decimal": decimal, "random": random, "__import__": "", - "globals": "也别惦记你那个 globals 了", - "compile": "想得美", - "help": "虽然但是 help 也不行", - "exit": "不许 exit", - "input": "你想干嘛", + "globals": "", + "compile": "", + "help": "", + "exit": "", + "input": "", "return": "别惦记你那个 return 了", "getattr": "", "setattr": "",