寄.png
This commit is contained in:
parent
680df057e3
commit
6b70ca7ebe
@ -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]
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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! {
|
||||
|
6
main.py
6
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)
|
||||
|
@ -39,11 +39,11 @@ def safe_eval(code: str) -> str:
|
||||
"decimal": decimal,
|
||||
"random": random,
|
||||
"__import__": "<built-in function __import__>",
|
||||
"globals": "也别惦记你那个 globals 了",
|
||||
"compile": "想得美",
|
||||
"help": "虽然但是 help 也不行",
|
||||
"exit": "不许 exit",
|
||||
"input": "你想干嘛",
|
||||
"globals": "<built-in function globals>",
|
||||
"compile": "<built-in function compile>",
|
||||
"help": "<built-in function help>",
|
||||
"exit": "<built-in function exit>",
|
||||
"input": "<built-in function input>",
|
||||
"return": "别惦记你那个 return 了",
|
||||
"getattr": "<built-in function getattr>",
|
||||
"setattr": "<built-in function setattr>",
|
||||
|
Loading…
Reference in New Issue
Block a user