更新一大堆相关东西

This commit is contained in:
shenjack 2024-05-10 23:03:44 +08:00
parent c02ac6234f
commit f83f7ceb0f
Signed by: shenjack
GPG Key ID: 7B1134A979775551
4 changed files with 11 additions and 11 deletions

View File

@ -171,7 +171,7 @@ function wrap_any(names, round) {
if (round > 500) {
output_datas_1 = [];
result.raw_data.forEach(function (data, index) {
if (data.round === 0) {
if (data.round % 500 === 0) {
output_datas_1.push(data);
}
});

View File

@ -154,7 +154,7 @@ async function wrap_any(names: string, round: number): Promise<string> {
// 把所有要找的数据拿出来
let output_datas: WinRate[] = [];
result.raw_data.forEach((data, index) => {
if (data.round === 0) {
if (data.round % 500 === 0) {
output_datas.push(data);
}
});

View File

@ -1,6 +1,6 @@
'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\nthis_is_a";
@ -26,9 +26,9 @@ let assets_data = {
};
let run_env = {
from_code: (typeof window == "undefined"),
is_node: (typeof Bun == "undefined"),
is_bun: (typeof Bun != "undefined"),
from_code: (typeof window === "undefined"),
is_node: (typeof Bun === "undefined"),
is_bun: (typeof Bun !== "undefined"),
version: _version_,
};
@ -196,16 +196,16 @@ if (run_env.from_code) {
}
global.document = {
createElement: function (tag) {
createElement: (tag) => {
// return fake_element.fake_init(tag);
return new fake_element(tag);
},
createTextNode: function (data) {
createTextNode: (data) => {
let node = new fake_element("text");
node.innerHTML = data;
return node;
},
querySelector: function (tag) {
querySelector: (tag) => {
// 搜索一下有没有这个元素
logger.debug("querySelector", tag);
for (let i = 0; i < stored_elements.length; i++) {

View File

@ -15,7 +15,7 @@ else:
IcaNewMessage = TypeVar("NewMessage")
IcaClient = TypeVar("IcaClient")
_version_ = "0.4.0"
_version_ = "0.4.1"
COMMAND = "/namerena"
@ -56,7 +56,7 @@ def on_ica_message(msg: IcaNewMessage, client: IcaClient) -> None:
# 发送结果
end_time = time.time()
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)
except Exception as e: