mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2024-11-23 20:45:06 +08:00
再改进一下 bmcl, 以及修改一下 ping
This commit is contained in:
parent
d9184925d2
commit
34ed6d1841
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "ica-rs"
|
name = "ica-rs"
|
||||||
version = "0.4.0"
|
version = "0.4.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
|
@ -38,7 +38,7 @@ pub fn add_message(payload: Payload, client: RawClient) {
|
||||||
}
|
}
|
||||||
// 就在这里处理掉最基本的消息
|
// 就在这里处理掉最基本的消息
|
||||||
// 之后的处理交给插件
|
// 之后的处理交给插件
|
||||||
if message.content.eq("/bot ping") {
|
if message.content.eq("/bot-rs") {
|
||||||
let reply = message.reply_with(&format!("ica-rs pong v{}", VERSION));
|
let reply = message.reply_with(&format!("ica-rs pong v{}", VERSION));
|
||||||
send_message(client, reply)
|
send_message(client, reply)
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ from data_struct import NewMessage, SendMessage
|
||||||
|
|
||||||
logger = config.get_logger("bmcl")
|
logger = config.get_logger("bmcl")
|
||||||
|
|
||||||
_version_ = "1.1.0"
|
_version_ = "1.1.1"
|
||||||
|
|
||||||
|
|
||||||
def format_data_size(data_bytes: float) -> str:
|
def format_data_size(data_bytes: float) -> str:
|
||||||
|
@ -79,9 +79,9 @@ async def bmcl(sio, reply_msg: SendMessage, msg: NewMessage):
|
||||||
|
|
||||||
report_msg = (
|
report_msg = (
|
||||||
f"OpenBMCLAPI 状态面板v{_version_} :\n"
|
f"OpenBMCLAPI 状态面板v{_version_} :\n"
|
||||||
f"在线节点: {online_node} 带宽: {online_bandwidth}Mbps\n"
|
f"实时信息: {online_node} 带宽: {online_bandwidth}Mbps\n"
|
||||||
f"实时负载: {load_str:.3f}% 带宽: {data_bandwidth:.5f}Mbps\n"
|
f"负载: {load_str:.2f}% 带宽: {data_bandwidth:.2f}Mbps\n"
|
||||||
f"当日请求: {hits_count} 总数据量: {data_len}\n"
|
f"当日请求: {hits_count} 数据量: {data_len}\n"
|
||||||
f"请求时间: {time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(req_time))}\n"
|
f"请求时间: {time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(req_time))}\n"
|
||||||
"数据源: https://bd.bangbang93.com/pages/dashboard"
|
"数据源: https://bd.bangbang93.com/pages/dashboard"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user