koishi-plugin-tmp-bot 1.12.0 → 1.12.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.
- package/lib/command/tmpQuery.js +8 -9
- package/package.json +1 -1
package/lib/command/tmpQuery.js
CHANGED
|
@@ -41,9 +41,6 @@ module.exports = async (ctx, cfg, session, tmpId) => {
|
|
|
41
41
|
|
|
42
42
|
// 查询线上信息
|
|
43
43
|
let playerMapInfo = await truckyAppApi.online(ctx.http, tmpId)
|
|
44
|
-
if (playerMapInfo.error) {
|
|
45
|
-
return '查询玩家信息失败,请重试'
|
|
46
|
-
}
|
|
47
44
|
|
|
48
45
|
// 拼接消息模板
|
|
49
46
|
let message = `<img src="${playerInfo.data.avatar}"/>`
|
|
@@ -85,12 +82,14 @@ module.exports = async (ctx, cfg, session, tmpId) => {
|
|
|
85
82
|
}
|
|
86
83
|
}
|
|
87
84
|
message += '\n🚫封禁次数: ' + playerInfo.data.bansCount || 0
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
85
|
+
if (playerMapInfo && !playerMapInfo.error) {
|
|
86
|
+
message += '\n📶在线状态: ' + (playerMapInfo.data.online ? `在线🟢 (${playerMapInfo.data.serverDetails.name})` : '离线⚫')
|
|
87
|
+
if (playerMapInfo.data.online) {
|
|
88
|
+
message += '\n🌍线上位置: '
|
|
89
|
+
message += await baiduTranslate(ctx, cfg, playerMapInfo.data.location.poi.country)
|
|
90
|
+
message += ' - '
|
|
91
|
+
message += await baiduTranslate(ctx, cfg, playerMapInfo.data.location.poi.realName)
|
|
92
|
+
}
|
|
94
93
|
}
|
|
95
94
|
let patreon = playerInfo.data.patreon
|
|
96
95
|
if (patreon && patreon.active) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-tmp-bot",
|
|
3
3
|
"description": "欧洲卡车模拟2 TMP查询插件,不会部署的可以直接使用此机器人->QQ:3523283907",
|
|
4
|
-
"version": "1.12.
|
|
4
|
+
"version": "1.12.1",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"homepage": "https://github.com/79887143/koishi-plugin-tmp-bot",
|