mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2024-11-23 20:45:06 +08:00
更新一大堆相关东西
This commit is contained in:
parent
c02ac6234f
commit
f83f7ceb0f
|
@ -171,7 +171,7 @@ function wrap_any(names, round) {
|
||||||
if (round > 500) {
|
if (round > 500) {
|
||||||
output_datas_1 = [];
|
output_datas_1 = [];
|
||||||
result.raw_data.forEach(function (data, index) {
|
result.raw_data.forEach(function (data, index) {
|
||||||
if (data.round === 0) {
|
if (data.round % 500 === 0) {
|
||||||
output_datas_1.push(data);
|
output_datas_1.push(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -154,7 +154,7 @@ async function wrap_any(names: string, round: number): Promise<string> {
|
||||||
// 把所有要找的数据拿出来
|
// 把所有要找的数据拿出来
|
||||||
let output_datas: WinRate[] = [];
|
let output_datas: WinRate[] = [];
|
||||||
result.raw_data.forEach((data, index) => {
|
result.raw_data.forEach((data, index) => {
|
||||||
if (data.round === 0) {
|
if (data.round % 500 === 0) {
|
||||||
output_datas.push(data);
|
output_datas.push(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const _version_ = "0.2.0";
|
const _version_ = "0.3.0";
|
||||||
|
|
||||||
// let name_input = "!test!\n\natest\n\ntest2";
|
// let name_input = "!test!\n\natest\n\ntest2";
|
||||||
// let name_input = "!test!\n\nthis_is_a";
|
// let name_input = "!test!\n\nthis_is_a";
|
||||||
|
@ -26,9 +26,9 @@ let assets_data = {
|
||||||
};
|
};
|
||||||
|
|
||||||
let run_env = {
|
let run_env = {
|
||||||
from_code: (typeof window == "undefined"),
|
from_code: (typeof window === "undefined"),
|
||||||
is_node: (typeof Bun == "undefined"),
|
is_node: (typeof Bun === "undefined"),
|
||||||
is_bun: (typeof Bun != "undefined"),
|
is_bun: (typeof Bun !== "undefined"),
|
||||||
version: _version_,
|
version: _version_,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -196,16 +196,16 @@ if (run_env.from_code) {
|
||||||
}
|
}
|
||||||
|
|
||||||
global.document = {
|
global.document = {
|
||||||
createElement: function (tag) {
|
createElement: (tag) => {
|
||||||
// return fake_element.fake_init(tag);
|
// return fake_element.fake_init(tag);
|
||||||
return new fake_element(tag);
|
return new fake_element(tag);
|
||||||
},
|
},
|
||||||
createTextNode: function (data) {
|
createTextNode: (data) => {
|
||||||
let node = new fake_element("text");
|
let node = new fake_element("text");
|
||||||
node.innerHTML = data;
|
node.innerHTML = data;
|
||||||
return node;
|
return node;
|
||||||
},
|
},
|
||||||
querySelector: function (tag) {
|
querySelector: (tag) => {
|
||||||
// 搜索一下有没有这个元素
|
// 搜索一下有没有这个元素
|
||||||
logger.debug("querySelector", tag);
|
logger.debug("querySelector", tag);
|
||||||
for (let i = 0; i < stored_elements.length; i++) {
|
for (let i = 0; i < stored_elements.length; i++) {
|
||||||
|
|
|
@ -15,7 +15,7 @@ else:
|
||||||
IcaNewMessage = TypeVar("NewMessage")
|
IcaNewMessage = TypeVar("NewMessage")
|
||||||
IcaClient = TypeVar("IcaClient")
|
IcaClient = TypeVar("IcaClient")
|
||||||
|
|
||||||
_version_ = "0.4.0"
|
_version_ = "0.4.1"
|
||||||
|
|
||||||
COMMAND = "/namerena"
|
COMMAND = "/namerena"
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ def on_ica_message(msg: IcaNewMessage, client: IcaClient) -> None:
|
||||||
# 发送结果
|
# 发送结果
|
||||||
end_time = time.time()
|
end_time = time.time()
|
||||||
reply = msg.reply_with(
|
reply = msg.reply_with(
|
||||||
f"{out_result}{err_result}\n耗时:{end_time - start_time:.2f}s\n版本:{_version_}"
|
f"{out_result}{err_result}外部耗时:{end_time - start_time:.2f}s\n版本:{_version_}"
|
||||||
)
|
)
|
||||||
client.send_message(reply)
|
client.send_message(reply)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user