koishi-plugin-aktmp 1.0.0 → 1.0.1
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.
|
@@ -10,13 +10,13 @@ module.exports = async (ctx, session, serverType, tmpId) => {
|
|
|
10
10
|
return '⚠️未启用 puppeteer 服务';
|
|
11
11
|
}
|
|
12
12
|
if (tmpId && isNaN(tmpId)) {
|
|
13
|
-
return
|
|
13
|
+
return `🔄输入错误,或请您绑定玩家ID编号`;
|
|
14
14
|
}
|
|
15
15
|
// 如果没有传入tmpId,尝试从数据库查询绑定信息
|
|
16
16
|
if (!tmpId) {
|
|
17
17
|
let guildBindData = await guildBind.get(ctx.database, session.platform, session.userId);
|
|
18
18
|
if (!guildBindData) {
|
|
19
|
-
return
|
|
19
|
+
return `🔄输入错误,或请您绑定玩家ID编号`;
|
|
20
20
|
}
|
|
21
21
|
tmpId = guildBindData.tmp_id;
|
|
22
22
|
}
|
|
@@ -13,7 +13,7 @@ module.exports = async (ctx) => {
|
|
|
13
13
|
// 构建消息
|
|
14
14
|
let message = `🌍 欧卡2 服务器状态\n`;
|
|
15
15
|
message += `📊 总在线人数 : ${totalOnline}人\n`;
|
|
16
|
-
message +=
|
|
16
|
+
message += `═════════════\n`;
|
|
17
17
|
let first = true;
|
|
18
18
|
for (let server of serverList) {
|
|
19
19
|
if (!first) message += '\n';
|
|
@@ -33,7 +33,7 @@ module.exports = async (ctx) => {
|
|
|
33
33
|
if (characteristicList.length > 0) {
|
|
34
34
|
message += '\n🚔 服务器特性: ' + characteristicList.join(' ');
|
|
35
35
|
}
|
|
36
|
-
message += '\n
|
|
36
|
+
message += '\n═════════════';
|
|
37
37
|
first = false;
|
|
38
38
|
}
|
|
39
39
|
return message;
|
|
@@ -101,7 +101,7 @@ module.exports = async (ctx, cfg, serverName) => {
|
|
|
101
101
|
}
|
|
102
102
|
// 构建消息
|
|
103
103
|
let message = `🚛 ${serverNameZh[serverQueryName]} 服务器热门路况交通\n`;
|
|
104
|
-
message +=
|
|
104
|
+
message += `━━━━━━━━━━━━━\n`;
|
|
105
105
|
let first = true;
|
|
106
106
|
for (const traffic of trafficData.data) {
|
|
107
107
|
const countryZh = await baiduTranslate(ctx, cfg, traffic.country);
|
|
@@ -114,9 +114,9 @@ module.exports = async (ctx, cfg, serverName) => {
|
|
|
114
114
|
if (!first) message += '\n';
|
|
115
115
|
message += `${countryZh} ${nameZh}${showType ? ' (' + (typeToZh[type] || type) + ')' : ''}`;
|
|
116
116
|
message += `\n路况: ${getSeverityFromData(traffic)} | 人数: ${traffic.players}`;
|
|
117
|
-
message += '\n
|
|
117
|
+
message += '\n─────────';
|
|
118
118
|
first = false;
|
|
119
119
|
}
|
|
120
|
-
message += '\n
|
|
120
|
+
message += '\n━━━━━━━━━━━━━';
|
|
121
121
|
return message || '⚠️暂无路况数据';
|
|
122
122
|
};
|
|
@@ -9,7 +9,7 @@ module.exports = async (ctx) => {
|
|
|
9
9
|
const padRight = (str, len) => str + ' '.repeat(Math.max(0, len - str.length));
|
|
10
10
|
// 构建消息返回
|
|
11
11
|
let message = '📶 TruckersMP 版本信息\n';
|
|
12
|
-
message += '
|
|
12
|
+
message += '✦─────────✦\n';
|
|
13
13
|
if (result.data.tmpVersion) {
|
|
14
14
|
message += `◈ 联机插件 ${padRight(result.data.tmpVersion, 8)}\n`;
|
|
15
15
|
}
|
|
@@ -26,6 +26,6 @@ module.exports = async (ctx) => {
|
|
|
26
26
|
message += `◈ 兼容游戏 ❌\n`;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
message += '
|
|
29
|
+
message += '✦─────────✦';
|
|
30
30
|
return message;
|
|
31
31
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-aktmp",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "1.0.
|
|
3
|
+
"description": "阿K自用版欧卡TruckersMP查询姬,作者:QQ737107334",
|
|
4
|
+
"version": "1.0.1",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"homepage": "https://github.com/737107334/koishi-plugin-aktmp",
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
"url": "https://space.bilibili.com/606891061"
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
|
-
"lib"
|
|
21
|
-
"dist"
|
|
20
|
+
"lib"
|
|
22
21
|
],
|
|
23
22
|
"license": "MIT",
|
|
24
23
|
"scripts": {},
|
package/readme.md
CHANGED
|
@@ -20,7 +20,17 @@
|
|
|
20
20
|
- 🚦 **路况信息** — 查看热门地点实时路况
|
|
21
21
|
- 📊 **里程排行** — 总里程/今日里程排行榜
|
|
22
22
|
- 🛤️ **服务器列表** — 查看 ETS2 服务器状态
|
|
23
|
-
- 🌍 **地图 DLC** —
|
|
23
|
+
- 🌍 **地图 DLC** — 查看最新的地图 DLC
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
### 更新日志
|
|
28
|
+
|
|
29
|
+
**v1.0.1**
|
|
30
|
+
- ✅ 新增服务器分割线显示
|
|
31
|
+
- ✅ 新增插件版本分割线显示
|
|
32
|
+
- ✅ 新增路况查询分割线显示
|
|
33
|
+
- ✅ 修复多项已知问题
|
|
24
34
|
|
|
25
35
|
---
|
|
26
36
|
|