koishi-plugin-tmp-bot 1.17.1 → 1.17.2
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/api/evmOpenApi.d.ts
CHANGED
package/lib/api/evmOpenApi.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare function _exports(ctx: any, cfg: any, session: any, tmpId: any): Promise<segment | "请输入正确的玩家编号" | "渲染异常,请重试" | "查询玩家信息失败,请重试" | "未启用 puppeteer 服务">;
|
|
1
|
+
declare function _exports(ctx: any, cfg: any, session: any, tmpId: any): Promise<segment | "请输入正确的玩家编号" | "渲染异常,请重试" | "查询玩家信息失败,请重试" | "未启用 puppeteer 服务" | "玩家不存在">;
|
|
2
2
|
export = _exports;
|
|
3
3
|
import { segment } from "@koishijs/core";
|
|
@@ -37,7 +37,10 @@ module.exports = async (ctx, cfg, session, tmpId) => {
|
|
|
37
37
|
}
|
|
38
38
|
// 查询玩家信息
|
|
39
39
|
let playerInfo = await evmOpenApi.playerInfo(ctx.http, tmpId);
|
|
40
|
-
if (playerInfo.error) {
|
|
40
|
+
if (playerInfo.error && playerInfo.code === 10001) {
|
|
41
|
+
return '玩家不存在';
|
|
42
|
+
}
|
|
43
|
+
else if (playerInfo.error) {
|
|
41
44
|
return '查询玩家信息失败,请重试';
|
|
42
45
|
}
|
|
43
46
|
// 查询线上信息
|
|
@@ -31,7 +31,10 @@ module.exports = async (ctx, cfg, session, tmpId) => {
|
|
|
31
31
|
}
|
|
32
32
|
// 查询玩家信息
|
|
33
33
|
let playerInfo = await evmOpenApi.playerInfo(ctx.http, tmpId);
|
|
34
|
-
if (playerInfo.error) {
|
|
34
|
+
if (playerInfo.error && playerInfo.code === 10001) {
|
|
35
|
+
return '玩家不存在';
|
|
36
|
+
}
|
|
37
|
+
else if (playerInfo.error) {
|
|
35
38
|
return '查询玩家信息失败,请重试';
|
|
36
39
|
}
|
|
37
40
|
// 查询线上信息
|
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.17.
|
|
4
|
+
"version": "1.17.2",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"homepage": "https://github.com/79887143/koishi-plugin-tmp-bot",
|