koishi-plugin-minecraft-search 2.0.6 → 2.0.7

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 (3) hide show
  1. package/lib/index.js +6 -6
  2. package/package.json +1 -1
  3. package/readme.md +14 -11
package/lib/index.js CHANGED
@@ -302,13 +302,13 @@ function apply(ctx, config) {
302
302
  }
303
303
  return formatDetailedStatus(result.data, tempServer, config.showIpInDetail);
304
304
  });
305
- ctx.guild().command("mc/绑定 <host:string>", "绑定Minecraft服务器").option("name", "-n <name:string>", { fallback: "" }).option("timeout", "-t <timeout:number>", { fallback: 5 }).option("instance", "-i <instance:string>", { fallback: "" }).action(async ({ session, options }, host) => {
305
+ ctx.guild().command("mc/绑定服务器 <host:string>", "绑定Minecraft服务器").option("name", "-n <name:string>", { fallback: "" }).option("timeout", "-t <timeout:number>", { fallback: 5 }).option("instance", "-i <instance:string>", { fallback: "" }).action(async ({ session, options }, host) => {
306
306
  const permissionError = await checkPermission(session, config);
307
307
  if (permissionError) {
308
308
  return permissionError;
309
309
  }
310
310
  if (!host) {
311
- return "请提供服务器地址,例如:绑定+IP地址(不带端口时默认为25565)";
311
+ return "请提供服务器地址,例如:绑定服务器+IP地址(不带端口时默认为25565)";
312
312
  }
313
313
  const groupId = session.guildId;
314
314
  const userId = session.userId;
@@ -363,13 +363,13 @@ function apply(ctx, config) {
363
363
  });
364
364
  return "✅ API密钥绑定成功!";
365
365
  });
366
- ctx.guild().command("mc/解绑 <id:number>", "解绑Minecraft服务器").action(async ({ session }, id) => {
366
+ ctx.guild().command("mc/解绑服务器 <id:number>", "解绑Minecraft服务器").action(async ({ session }, id) => {
367
367
  const permissionError = await checkPermission(session, config);
368
368
  if (permissionError) {
369
369
  return permissionError;
370
370
  }
371
371
  if (!id) {
372
- return "请提供服务器ID,例如:解绑 1";
372
+ return "请提供服务器ID,例如:解绑服务器 1";
373
373
  }
374
374
  const groupId = session.guildId;
375
375
  const servers = await ctx.database.get("minecraft_server", { groupId });
@@ -380,13 +380,13 @@ function apply(ctx, config) {
380
380
  await ctx.database.remove("minecraft_server", { id });
381
381
  return `✅ 服务器已解绑`;
382
382
  });
383
- ctx.guild().command("mc/修改 <id:number>", "修改Minecraft服务器信息").option("name", "-n <name:string>", { fallback: "" }).option("timeout", "-t <timeout:number>", { fallback: 0 }).option("instance", "-i <instance:string>", { fallback: "" }).action(async ({ session, options }, id) => {
383
+ ctx.guild().command("mc/修改服务器 <id:number>", "修改Minecraft服务器信息").option("name", "-n <name:string>", { fallback: "" }).option("timeout", "-t <timeout:number>", { fallback: 0 }).option("instance", "-i <instance:string>", { fallback: "" }).action(async ({ session, options }, id) => {
384
384
  const permissionError = await checkPermission(session, config);
385
385
  if (permissionError) {
386
386
  return permissionError;
387
387
  }
388
388
  if (!id) {
389
- return "请提供服务器ID,例如:修改 1";
389
+ return "请提供服务器ID,例如:修改服务器 1";
390
390
  }
391
391
  const groupId = session.guildId;
392
392
  const servers = await ctx.database.get("minecraft_server", { groupId });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-minecraft-search",
3
3
  "description": "用于查询Minecraft服务器状态。如果服务器来自于麦块联机,那么可以查询指定服务器的详细资源使用情况,甚至还能对指定服务器进行电源开启或重启操作",
4
- "version": "2.0.6",
4
+ "version": "2.0.7",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
package/readme.md CHANGED
@@ -63,12 +63,12 @@ npm install koishi-plugin-minecraft-search
63
63
 
64
64
  ### 服务器管理
65
65
  ```
66
- mc/绑定 <host> [-n <name>] [-t <timeout>] [-i <instance>] # 绑定服务器,支持指定名称、超时时间和麦块实例ID
67
- mc/解绑 <id> # 解绑服务器
68
- mc/修改 <id> [-n <name>] [-t <timeout>] [-i <instance>] # 修改服务器信息,支持修改名称、超时时间和麦块实例ID
66
+ mc/绑定服务器 <host> [-n <name>] [-t <timeout>] [-i <instance>] # 绑定服务器,支持指定名称、超时时间和麦块实例ID
67
+ mc/解绑服务器 <id> # 解绑服务器
68
+ mc/修改服务器 <id> [-n <name>] [-t <timeout>] [-i <instance>] # 修改服务器信息,支持修改名称、超时时间和麦块实例ID
69
69
  mc/服务器列表 # 查看已绑定的服务器列表
70
70
  mc/设置实例 <id> <instanceId> # 设置服务器的麦块实例ID
71
- mc/绑定API密钥 <apiKey> # 绑定麦块API密钥
71
+ mc/绑定密钥 <apiKey> # 绑定麦块API密钥
72
72
  ```
73
73
 
74
74
  ### 查询服务器状态
@@ -118,26 +118,26 @@ mc/资源 1 # 查看ID为1的麦块服务器资源使用情况
118
118
  ## 指令说明
119
119
 
120
120
  ### 绑定服务器
121
- - **命令**:`mc/绑定 <host> [-n <name>] [-t <timeout>] [-i <instance>]`
121
+ - **命令**:`mc/绑定服务器 <host> [-n <name>] [-t <timeout>] [-i <instance>]`
122
122
  - **参数**:
123
123
  - `<host>`:服务器地址,支持带端口格式(如:`play.example.com:25565`)
124
124
  - `-n <name>`:服务器名称(可选,默认使用地址作为名称)
125
125
  - `-t <timeout>`:查询超时时间(可选,默认5秒)
126
126
  - `-i <instance>`:麦块实例ID(可选,用于电源控制)
127
127
  - **示例**:
128
- - `mc/绑定 s3.ungc.com.cn` - 绑定默认端口的服务器
129
- - `mc/绑定 s3.ungc.com.cn:37095 -n 测试服 -t 10` - 绑定指定端口、名称和超时的服务器
130
- - `mc/绑定 s3.ungc.com.cn -i abc123` - 绑定服务器并设置麦块实例ID
128
+ - `mc/绑定服务器 s3.ungc.com.cn` - 绑定默认端口的服务器
129
+ - `mc/绑定服务器 s3.ungc.com.cn:37095 -n 测试服 -t 10` - 绑定指定端口、名称和超时的服务器
130
+ - `mc/绑定服务器 s3.ungc.com.cn -i abc123` - 绑定服务器并设置麦块实例ID
131
131
 
132
132
  ### 绑定API密钥
133
- - **命令**:`mc/绑定API密钥 <apiKey>`
133
+ - **命令**:`mc/绑定密钥 <apiKey>`
134
134
  - **参数**:
135
135
  - `<apiKey>`:麦块联机平台的API密钥
136
136
  - **说明**:每个群组只需绑定一次,后续会自动使用该密钥
137
137
 
138
138
  ### 服务器管理指令
139
- - **`mc/解绑 <id>`**:解绑指定ID的服务器
140
- - **`mc/修改 <id> [-n <name>] [-t <timeout>] [-i <instance>]`**:修改服务器名称、超时时间或麦块实例ID
139
+ - **`mc/解绑服务器 <id>`**:解绑指定ID的服务器
140
+ - **`mc/修改服务器 <id> [-n <name>] [-t <timeout>] [-i <instance>`**:修改服务器名称、超时时间或麦块实例ID
141
141
  - **`mc/设置实例 <id> <instanceId>`**:为服务器设置麦块实例ID,用于电源控制
142
142
  - **`mc/服务器列表`**:查看当前群组已绑定的所有服务器
143
143
 
@@ -186,6 +186,9 @@ mc/资源 1 # 查看ID为1的麦块服务器资源使用情况
186
186
  <details>
187
187
  <summary>点我查看更新日志详情</summary>
188
188
 
189
+ ### v2.0.7
190
+ - 优化指令命名,将"绑定"改为"绑定服务器","解绑"改为"解绑服务器","修改"改为"修改服务器"
191
+
189
192
  ### v2.0.5
190
193
  - 调整权限检查配置项默认值:`enablePermissionCheck` 默认值改为 false,`allowMemberPowerCommands` 默认值改为 true
191
194
  - 优化权限配置项的描述,明确权限配置仅适用于onebot机器人