koishi-plugin-node-async-bot-all 1.10.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +6 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -33,7 +33,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
33
33
|
// src/locales/zh-CN.yml
|
|
34
34
|
var require_zh_CN = __commonJS({
|
|
35
35
|
"src/locales/zh-CN.yml"(exports2, module2) {
|
|
36
|
-
module2.exports = { commands: { cx: { description: "查询服务器当前人数。", messages: { msg: "{time}\n【服务器当前人数】\n➣ {version}:{players}\n➣ 玩家列表:{list}\n➣ 协议版本:{protocol}\n进服指南请在群公告中查看。", msgNoPlayer: "{time}\n【服务器当前人数】\n➣ {version}:{players}\n➣ 协议版本:{protocol}\n进服指南请在群公告中查看。", forbidden: "{time}\n此指令不允许在本群使用。", failed: "{time}\n查询失败:{data}\n请稍后重试。", timeout: "请求超时。", close: "服务器已关闭。", error: "执行错误。", unknown: "未知错误。", host: "没有到主机的路由。" } }, status: { description: "查询机器人状态。", messages: { msg: "{time}\n系统名称:{name}\nCPU使用率:{cpu}\n内存使用率:{memory}", failed: "{time}\n状态获取失败。" } }, random: { description: "随机数生成器。", usage: "缺少参数时默认生成 0-10000 的随机数。\n使用示例:", examples: "random 1 128 生成1到128范围的随机数", messages: { msg: "{time}\n生成的随机数:{data}" } }, info: { description: "查询机器人信息。", messages: { msg: "{data}", failed: "{time}\n读取信息失败。" } }, rw: { description: "随机名言名句。", messages: { msg: "{time}\n{data}", failed1: "{time}\n获取失败(1)。", failed2: "{time}\n获取失败(2)。" } }, cassie: { description: "发送 C.A.S.S.I.E. 语音。", usage: "缺少参数时返回语音列表。\n使用示例:", examples: "cassie mtfSpawn 播放当机动特遣队重生并且SCP还活着时的语音。", messages: { msg: "{time}\n【播放列表】\n{data}", failed: "{time}\n发送失败,请稍后重试。", unknown: "{time}\n未知语音,发送 /cassie 查看播放列表。" } } } };
|
|
36
|
+
module2.exports = { commands: { cx: { description: "查询服务器当前人数。", messages: { msg: "{time}\n【服务器当前人数】\n➣ {version}:{players}\n➣ 玩家列表:{list}\n➣ 协议版本:{protocol}\n进服指南请在群公告中查看。", msgNoPlayer: "{time}\n【服务器当前人数】\n➣ {version}:{players}\n➣ 协议版本:{protocol}\n进服指南请在群公告中查看。", forbidden: "{time}\n此指令不允许在本群使用。", failed: "{time}\n查询失败:{data}\n请稍后重试。", timeout: "请求超时。", timeout2: "响应超时。", fewData: "服务端返回的数据过少。", close: "服务器已关闭。", error: "执行错误。", unknown: "未知错误。", host: "没有到主机的路由。" } }, status: { description: "查询机器人状态。", messages: { msg: "{time}\n系统名称:{name}\nCPU使用率:{cpu}\n内存使用率:{memory}", failed: "{time}\n状态获取失败。" } }, random: { description: "随机数生成器。", usage: "缺少参数时默认生成 0-10000 的随机数。\n使用示例:", examples: "random 1 128 生成1到128范围的随机数", messages: { msg: "{time}\n生成的随机数:{data}" } }, info: { description: "查询机器人信息。", messages: { msg: "{data}", failed: "{time}\n读取信息失败。" } }, rw: { description: "随机名言名句。", messages: { msg: "{time}\n{data}", failed1: "{time}\n获取失败(1)。", failed2: "{time}\n获取失败(2)。" } }, cassie: { description: "发送 C.A.S.S.I.E. 语音。", usage: "缺少参数时返回语音列表。\n使用示例:", examples: "cassie mtfSpawn 播放当机动特遣队重生并且SCP还活着时的语音。", messages: { msg: "{time}\n【播放列表】\n{data}", failed: "{time}\n发送失败,请稍后重试。", unknown: "{time}\n未知语音,发送 /cassie 查看播放列表。" } } } };
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
|
|
@@ -51,7 +51,7 @@ var import_koishi = require("koishi");
|
|
|
51
51
|
var import_os = __toESM(require("os"));
|
|
52
52
|
|
|
53
53
|
// package.json
|
|
54
|
-
var version = "1.
|
|
54
|
+
var version = "1.11.0";
|
|
55
55
|
|
|
56
56
|
// src/fun.ts
|
|
57
57
|
var import_fs = __toESM(require("fs"));
|
|
@@ -212,6 +212,10 @@ async function getServer(ctx, session) {
|
|
|
212
212
|
error = session.text(".host");
|
|
213
213
|
} else if (error.includes("Connection timed out")) {
|
|
214
214
|
error = session.text(".timeout");
|
|
215
|
+
} else if (error.includes("Server returned too few data")) {
|
|
216
|
+
error = session.text(".fewData");
|
|
217
|
+
} else if (error.includes("Server read timed out")) {
|
|
218
|
+
error = session.text(".timeout2");
|
|
215
219
|
}
|
|
216
220
|
} catch (e) {
|
|
217
221
|
if (dataError.includes("CDN节点请求源服务器超时")) {
|