koishi-plugin-lolbaninfo 1.1.3 → 1.1.4

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.
Files changed (2) hide show
  1. package/lib/index.js +16 -7
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -84,7 +84,7 @@ var Config = import_koishi.Schema.intersect([
84
84
  api: import_koishi.Schema.object({
85
85
  // API相关配置分组
86
86
  apiUrl: import_koishi.Schema.string().description("目标网站的API接口地址").default("https://yun.4png.com/api/query.html"),
87
- apiToken: import_koishi.Schema.string().description("网站API的访问Token(注册即可获得)").required()
87
+ apiToken: import_koishi.Schema.string().description("网站API的访问Token(注册即可获得)").role("secret").required()
88
88
  // 需要用户输入的
89
89
  }).description("API 设置"),
90
90
  // API 相关配置的分组描述
@@ -164,7 +164,11 @@ function apply(ctx, config) {
164
164
  if (!isValidQQ(qq)) {
165
165
  const errorLog = `QQ号格式错误:${qq}`;
166
166
  logger.warn(errorLog);
167
- return formatReplyMessage(session, `❌ QQ号格式错误:${qq}(需5-13位数字)`, config);
167
+ return formatReplyMessage(
168
+ session,
169
+ `❌ QQ号格式错误:${qq}(需5-13位数字)`,
170
+ config
171
+ );
168
172
  }
169
173
  try {
170
174
  const result = await requestWithRetry(ctx, config, qq);
@@ -177,7 +181,8 @@ function apply(ctx, config) {
177
181
  return formatReplyMessage(
178
182
  session,
179
183
  `✅ 查询成功:${msg}
180
- 📝 详细信息:${banInfo}`,
184
+
185
+ 📝 详细信息:${banInfo}`,
181
186
  config
182
187
  );
183
188
  case 400:
@@ -200,7 +205,8 @@ function apply(ctx, config) {
200
205
  return formatReplyMessage(
201
206
  session,
202
207
  `🛑 请求被拒绝 [403]:可能因查询过于频繁或IP受限
203
- ⏳ 建议稍后再试,或联系 API 提供方`,
208
+
209
+ ⏳ 建议稍后再试,或联系 API 提供方`,
204
210
  config
205
211
  );
206
212
  case 404:
@@ -208,7 +214,8 @@ function apply(ctx, config) {
208
214
  return formatReplyMessage(
209
215
  session,
210
216
  `❓ 未找到相关信息 [404]
211
- 📢 QQ ${qq} 可能未绑定《英雄联盟》账号,或当前无封禁记录`,
217
+
218
+ 📢 QQ ${qq} 可能未绑定《英雄联盟》账号,或当前无封禁记录`,
212
219
  config
213
220
  );
214
221
  case 429:
@@ -223,7 +230,8 @@ function apply(ctx, config) {
223
230
  return formatReplyMessage(
224
231
  session,
225
232
  `🛠️ 服务器内部错误 [500]:${msg}
226
- 📡 问题出在 API 服务端,请稍后再试`,
233
+
234
+ 📡 问题出在 API 服务端,请稍后再试`,
227
235
  config
228
236
  );
229
237
  case 502:
@@ -233,7 +241,8 @@ function apply(ctx, config) {
233
241
  return formatReplyMessage(
234
242
  session,
235
243
  `☁️ 服务暂时不可用 [${result.code}]:${msg}
236
- 🔌 可能是 API 服务维护或超载,请稍后重试`,
244
+
245
+ 🔌 可能是 API 服务维护或超载,请稍后重试`,
237
246
  config
238
247
  );
239
248
  default:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-lolbaninfo",
3
3
  "description": "LOL封号查询插件",
4
- "version": "1.1.3",
4
+ "version": "1.1.4",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/lenksen/lolbaninfo.git"