koishi-plugin-ggcevo 1.0.9 → 1.0.10
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.d.ts +1 -0
- package/lib/index.js +10 -4
- package/package.json +1 -1
- package/readme.md +13 -5
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -36,15 +36,16 @@ var Config = import_koishi.Schema.object({
|
|
|
36
36
|
mapMonitorGroups: import_koishi.Schema.array(import_koishi.Schema.string()).description("地图检测广播的群组ID列表").default([]),
|
|
37
37
|
mapMonitorMapIds: import_koishi.Schema.array(import_koishi.Schema.number()).description("需要检测的地图ID列表").default([]),
|
|
38
38
|
mapMonitorApiUrl: import_koishi.Schema.string().description("地图检测API地址").default("https://server.dreamprotocol.info:13085/mapmonitor/maps"),
|
|
39
|
+
mapMonitorRecommendMapName: import_koishi.Schema.string().description("当所有配置地图均离线时, 推荐玩家游玩的地图名称").default(""),
|
|
39
40
|
tencentDocsEnabled: import_koishi.Schema.boolean().description("是否启用腾讯文档功能").default(false),
|
|
40
41
|
tencentDocsClientId: import_koishi.Schema.string().description("腾讯文档开放平台应用 Client ID(应用ID)").default(""),
|
|
41
42
|
tencentDocsClientSecret: import_koishi.Schema.string().description("腾讯文档应用 Client Secret(应用级账号模式需要, 用户级模式留空)").role("secret").default(""),
|
|
42
43
|
tencentDocsAccessToken: import_koishi.Schema.string().description("腾讯文档 Access Token(用户级模式必填, 通过扫码授权获取)").role("secret").default(""),
|
|
43
44
|
tencentDocsOpenId: import_koishi.Schema.string().description("腾讯文档 Open ID(用户级模式必填, 与 Access Token 同时获取)").default(""),
|
|
44
|
-
tencentDocsBanListFileId: import_koishi.Schema.string().description("封禁记录在线表格的文件ID(短ID或完整ID)").default("
|
|
45
|
-
tencentDocsBanListSheetId: import_koishi.Schema.string().description("封禁记录工作表ID(表格URL中tab参数)").default("
|
|
46
|
-
tencentDocsAdminWelfareFileId: import_koishi.Schema.string().description("管理员福利在线表格的文件ID(短ID或完整ID, A列QQ号/B列句柄)").default("
|
|
47
|
-
tencentDocsAdminWelfareSheetId: import_koishi.Schema.string().description("管理员福利工作表ID(表格URL中tab参数)").default("
|
|
45
|
+
tencentDocsBanListFileId: import_koishi.Schema.string().description("封禁记录在线表格的文件ID(短ID或完整ID)").default(""),
|
|
46
|
+
tencentDocsBanListSheetId: import_koishi.Schema.string().description("封禁记录工作表ID(表格URL中tab参数)").default(""),
|
|
47
|
+
tencentDocsAdminWelfareFileId: import_koishi.Schema.string().description("管理员福利在线表格的文件ID(短ID或完整ID, A列QQ号/B列句柄)").default(""),
|
|
48
|
+
tencentDocsAdminWelfareSheetId: import_koishi.Schema.string().description("管理员福利工作表ID(表格URL中tab参数)").default("")
|
|
48
49
|
});
|
|
49
50
|
var inject = {
|
|
50
51
|
required: ["database"]
|
|
@@ -524,6 +525,11 @@ ${message}
|
|
|
524
525
|
}
|
|
525
526
|
return lines.join("\n");
|
|
526
527
|
});
|
|
528
|
+
const allOffline = targetMaps.length > 0 && targetMaps.every((m) => !m.isOnline);
|
|
529
|
+
if (allOffline && config.mapMonitorRecommendMapName) {
|
|
530
|
+
messages.push(`━━━━━━━━━━━━━━━━
|
|
531
|
+
💡 当前所有地图均处于离线状态,推荐游玩「${config.mapMonitorRecommendMapName}」`);
|
|
532
|
+
}
|
|
527
533
|
return `<quote id="${argv.session.messageId}"/>${messages.join("\n")}`;
|
|
528
534
|
} catch (error) {
|
|
529
535
|
console.error("查询地图检测信息失败:", error);
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -27,6 +27,7 @@ npm install koishi-plugin-ggcevo
|
|
|
27
27
|
| `mapMonitorGroups` | `string[]` | `[]` | 地图检测广播的群组 ID 列表 |
|
|
28
28
|
| `mapMonitorMapIds` | `number[]` | `[]` | 需要检测的地图 ID 列表 |
|
|
29
29
|
| `mapMonitorApiUrl` | `string` | `https://server.dreamprotocol.info:13085/mapmonitor/maps` | 地图检测 API 地址 |
|
|
30
|
+
| `mapMonitorRecommendMapName` | `string` | `''` | 当所有配置地图均离线时,推荐玩家游玩的地图名称 |
|
|
30
31
|
|
|
31
32
|
### 腾讯文档(封禁记录查询)
|
|
32
33
|
|
|
@@ -39,10 +40,10 @@ npm install koishi-plugin-ggcevo
|
|
|
39
40
|
| `tencentDocsClientSecret` | `string` | `''` | 应用 Client Secret(**应用级模式必填**,用户级模式留空) |
|
|
40
41
|
| `tencentDocsAccessToken` | `string` | `''` | Access Token(**用户级模式必填**,通过扫码授权获取) |
|
|
41
42
|
| `tencentDocsOpenId` | `string` | `''` | Open ID(**用户级模式必填**,与 Access Token 同时获取) |
|
|
42
|
-
| `tencentDocsBanListFileId` | `string` | `
|
|
43
|
-
| `tencentDocsBanListSheetId` | `string` | `
|
|
44
|
-
| `tencentDocsAdminWelfareFileId` | `string` | `
|
|
45
|
-
| `tencentDocsAdminWelfareSheetId` | `string` | `
|
|
43
|
+
| `tencentDocsBanListFileId` | `string` | `''` | 封禁记录在线表格文件ID(短ID或完整ID) |
|
|
44
|
+
| `tencentDocsBanListSheetId` | `string` | `''` | 封禁记录工作表ID(表格URL中 `tab` 参数) |
|
|
45
|
+
| `tencentDocsAdminWelfareFileId` | `string` | `''` | 管理员福利在线表格文件ID(短ID或完整ID,A列QQ号/B列句柄) |
|
|
46
|
+
| `tencentDocsAdminWelfareSheetId` | `string` | `''` | 管理员福利工作表ID(表格URL中 `tab` 参数) |
|
|
46
47
|
|
|
47
48
|
**授权模式说明:**
|
|
48
49
|
- **用户级模式**(推荐用于无 `Client Secret` 的场景):填写 `tencentDocsClientId` + `tencentDocsAccessToken` + `tencentDocsOpenId`,三者均通过腾讯文档开放平台扫码授权流程获取。Token 过期后需重新获取并在控制台更新。
|
|
@@ -59,7 +60,7 @@ npm install koishi-plugin-ggcevo
|
|
|
59
60
|
| `切换 [index]` | — | 切换正在使用的游戏句柄 |
|
|
60
61
|
| `查询 [handle]` | — | 查询某游戏句柄是否已被绑定 |
|
|
61
62
|
| `解绑 [index]` | 解绑句柄 | 解除绑定某个游戏句柄 |
|
|
62
|
-
| `地图检测` | — | 查询已配置地图(`mapMonitorMapIds`)的检测状态:在线状态、最后状态变更时间、24h/30d
|
|
63
|
+
| `地图检测` | — | 查询已配置地图(`mapMonitorMapIds`)的检测状态:在线状态、最后状态变更时间、24h/30d离线次数、近期事件。当所有配置地图均离线时,底部额外提示推荐游玩的地图(需配置 `mapMonitorRecommendMapName`)。需开启 `mapMonitorEnabled` 且配置地图ID |
|
|
63
64
|
|
|
64
65
|
### 签到与虚拟物品(ggcevo)
|
|
65
66
|
|
|
@@ -130,6 +131,13 @@ npm install koishi-plugin-ggcevo
|
|
|
130
131
|
|
|
131
132
|
## 更新日志
|
|
132
133
|
|
|
134
|
+
### v1.0.10
|
|
135
|
+
|
|
136
|
+
地图检测新增推荐地图提示,腾讯文档配置项默认值调整。
|
|
137
|
+
|
|
138
|
+
- **新增配置项** `mapMonitorRecommendMapName`:当所有配置地图均离线时,在「地图检测」指令返回消息底部额外提示推荐游玩的地图名称
|
|
139
|
+
- **配置项默认值调整**:取消 `tencentDocsBanListFileId`、`tencentDocsBanListSheetId`、`tencentDocsAdminWelfareFileId`、`tencentDocsAdminWelfareSheetId` 的默认填充值,改为空字符串,需手动在控制台填写
|
|
140
|
+
|
|
133
141
|
### v1.0.9
|
|
134
142
|
|
|
135
143
|
优化指令交互体验与活动列表过滤。
|