koishi-plugin-noah 2.3.5 → 2.3.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.
@@ -8,6 +8,11 @@ export interface QueryParams {
8
8
  grade?: SDVXGrade | SDVXGrade[];
9
9
  clearType?: SDVXClearType | SDVXClearType[];
10
10
  vf?: number | number[];
11
+ excludeLevel?: number[];
12
+ excludeScore?: number[];
13
+ excludeGrade?: SDVXGrade[];
14
+ excludeClearType?: SDVXClearType[];
15
+ excludeVf?: number[];
11
16
  }
12
17
  /**
13
18
  * 解析带后缀的数字
@@ -49,7 +54,4 @@ export declare function parseSingleGrade(item: string): SDVXGrade[] | null;
49
54
  * 解析雷达特征
50
55
  */
51
56
  export declare function parseRadarFeature(item: string): string | null;
52
- /**
53
- * 解析用户输入参数
54
- */
55
57
  export declare function parseQueryInput(input: string): QueryParams;
package/lib/index.cjs CHANGED
@@ -1405,8 +1405,9 @@ __name(showCardMenu, "showCardMenu");
1405
1405
  // src/core/commands/help.ts
1406
1406
  function help(ctx, config) {
1407
1407
  ctx.command("help", { slash: true }).alias("帮助").action(({ session }) => {
1408
- console.log(session);
1409
- return session.text(".content");
1408
+ let msg = session.text(".content");
1409
+ if (session.platform == "onebot") msg = msg.concat(session.text(".qq-extra"));
1410
+ return msg;
1410
1411
  });
1411
1412
  }
1412
1413
  __name(help, "help");
@@ -2267,13 +2268,13 @@ function apply4(ctx, config) {
2267
2268
  __name(apply4, "apply");
2268
2269
 
2269
2270
  // src/core/locales/en-US.yml
2270
- var en_US_default2 = { _config: { $desc: "Core Module Settings", adminUsers: "**Plugin Admin** User ID (use inspect command to get)", guildNameCards: "**Group Card** Name List", maoServerUrl: "**Mao Server** URL address", official_support_url: "**Official Support** URL address" }, commands: { maintain: { description: "Switch to maintenance mode", messages: { "no-auth": "<p>You don't have permission to use this feature~</p>", start: "<p>Entering maintenance mode</p>", "success-start": "<p>Successfully switched to maintenance mode</p>", stop: "<p>Exiting maintenance mode</p>", "success-stop": "<p>Successfully exited maintenance mode</p>" } }, timeout: "Noah didn't wait for your reply, please try again!", help: { description: "Show Noah help information", messages: { content: "<p>Guide:</p>\nhttps://docs.logthm.cn/noah" } }, locale: { description: "Set language", messages: { "no-auth": "<p>Only group admins can use this feature~</p>", "invalid-select": "<p>No such option!</p>", quit: "<p>Quit!</p>", "reset-channel": "<p>Reset successfully!</p>", "reset-user": "<p>Reset successfully!</p>", success: "<p>Set successfully!</p>", "set-channel": "<p>Select the default language for group chats:</p>\n<p>1. 简体中文</p>\n<p>2. English</p>\n<p>q. Quit</p>", "set-user": "<p>Select the language you use:</p>\n<p>1. 中文</p>\n<p>2. English</p>\n<p>q. Quit</p>" } }, link: { description: "Link account to another platform", options: { remove: "Unlink" }, messages: { "generated-1": `<p>The Link command can be used to link user data across multiple platforms. During the linking process, the original platform's user data is fully preserved, while the target platform's user data is overwritten.</p>
2271
+ var en_US_default2 = { _config: { $desc: "Core Module Settings", adminUsers: "**Plugin Admin** User ID (use inspect command to get)", guildNameCards: "**Group Card** Name List", maoServerUrl: "**Mao Server** URL address", official_support_url: "**Official Support** URL address" }, commands: { maintain: { description: "Switch to maintenance mode", messages: { "no-auth": "<p>You don't have permission to use this feature~</p>", start: "<p>Entering maintenance mode</p>", "success-start": "<p>Successfully switched to maintenance mode</p>", stop: "<p>Exiting maintenance mode</p>", "success-stop": "<p>Successfully exited maintenance mode</p>" } }, timeout: "Noah didn't wait for your reply, please try again!", help: { description: "Show Noah help information", messages: { content: "<p>Guide:</p>\n<p>https://docs.logthm.cn/noah</p>", "qq-extra": "<p>Having issues? Join group 723977027 to give feedback~</p>" } }, locale: { description: "Set language", messages: { "no-auth": "<p>Only group admins can use this feature~</p>", "invalid-select": "<p>No such option!</p>", quit: "<p>Quit!</p>", "reset-channel": "<p>Reset successfully!</p>", "reset-user": "<p>Reset successfully!</p>", success: "<p>Set successfully!</p>", "set-channel": "<p>Select the default language for group chats:</p>\n<p>1. 简体中文</p>\n<p>2. English</p>\n<p>q. Quit</p>", "set-user": "<p>Select the language you use:</p>\n<p>1. 中文</p>\n<p>2. English</p>\n<p>q. Quit</p>" } }, link: { description: "Link account to another platform", options: { remove: "Unlink" }, messages: { "generated-1": `<p>The Link command can be used to link user data across multiple platforms. During the linking process, the original platform's user data is fully preserved, while the target platform's user data is overwritten.</p>
2271
2272
  <p>Please make sure the current platform is your target platform and send the following text to the bot on the original platform within 5 minutes:</p>
2272
2273
  <p>{0}</p>
2273
2274
  <p>Once linked, you can use "link -r" to unlink at any time.</p>`, "generated-2": "<p>Token verified! Now proceeding to the second step.</p>\n<p>Please send the following text to the bot on the target platform within 5 minutes:</p>\n<p>{0}</p>\n<p>Note: The current platform is your original platform. User data here will overwrite the target platform's data.</p>", "self-1": "<p>Please enter this on the original platform.</p>", "self-2": "<p>Please enter this on the target platform.</p>", success: "<p>Account linked successfully!</p>", "remove-success": "<p>Account unlinked successfully!</p>", "remove-original": "<p>Cannot unlink: this is your original account.</p>" } }, bind: { description: "Bind card", messages: { prompt: "<p>Please enter your card number:</p>", "convert-access-failed": "<p>Failed to convert Access Code, please use 16-digit card code instead.</p>", "invalid-code": "<p>The card number is incorrect, if you don't remember it, go to the arcade to check it~</p>", name: "<p>Received! Please give this card a name, no spaces allowed:</p>", "invalid-name": "<p>No spaces allowed! Please try again o(一︿一+)o</p>", success: "<p>Bound successfully, your card information is as follows:</p>\n<p>[{cardName}]</p>\n<p>{cardCode}</p>" } }, card: { description: "Manage cards", options: { detail: "Show detailed card information" }, messages: { "invalid-code": "<p>The card number is incorrect, if you don't remember it, go to the arcade to check it~</p>", "invalid-select": "<p>No such option!</p>", "lookup-error": "Lookup failed: {message}", "lookup-error-unknown": "Lookup failed: unknown error", "menu-select": "<p>[Card Management]</p>\n{card_list}\n<p>0. Add new card</p>\n<p>Please enter the serial number:</p>", menu: "<p>[{name}]</p>\n<p>1. Set as default card</p>\n<p>2. View or modify card number</p>\n<p>3. Delete the card</p>\n<p>4. Rename the card</p>\n<p>5. Bind the card to a specified server</p>\n<p>0. Return to card selection</p>\n<p>Please enter the serial number:</p>", "menu-has-bound-server": "<p>[{name}]</p>\n<p>Bound server: {defaultServerName}</p>\n<p>1. Set as default card</p>\n<p>2. View or modify card number</p>\n<p>3. Delete the card</p>\n<p>4. Rename the card</p>\n<p>5. Bind the card to a specified server</p>\n<p>0. Return to card selection</p>\n<p>Please enter the serial number:</p>", "menu-1-success": "<p>Set successfully!</p>", "menu-1-error-duplicate": "<p>The selected card is the same as the old default card!</p>", "menu-2-prompt": "<p>Card number: {code}</p>\n<p>Please enter the new card number:</p>\n<p>Enter 0 to return</p>", "menu-2-success": "<p>Modified successfully!</p>", "menu-2-error-invalid-code": "<p>The card number is incorrect, if you don't remember it, go to the arcade to check it~</p>", "menu-3-success": "<p>Deleted successfully!</p>", "menu-4-prompt": "<p>Enter a new name, no spaces allowed:</p>", "menu-4-error-invalid-name": "<p>No spaces allowed! Please try again o(一︿一+)o</p>", "menu-4-success": "<p>Modified successfully!</p>", "menu-5": "{server_list}\n<p>Please enter the serial number:</p>", "menu-5-success": "<p>Set successfully!</p>", "menu-5-error-duplicate": "<p>The selected server is the same as the old default server!</p>" } }, server: { description: "Manage servers", messages: { "no-channel": "<p>Please use this feature in group chats~</p>", "invalid-select": "<p>No such option!</p>", "no-auth": "<p>Only group admins can use this feature~</p>", "admin-menu-select": "<p>[Group server management]</p>\n{server_list}\n<p>0. Add new server</p>\n<p>Please enter the serial number:</p>", "menu-select": "<p>[Server management]</p>\n{server_list}\n<p>0. Add new server</p>\n<p>Please enter the serial number:</p>", menu: "<p>[{name}]</p>\n<p>Type: {type}</p>\n<p>1. Set as default server</p>\n<p>2. View or modify url</p>\n<p>3. Delete the server</p>\n<p>4. Rename the server</p>\n<p>0. Return to server selection</p>\n<p>Please enter the serial number:</p>", "menu-1-success": "<p>Set successfully!</p>", "menu-1-error-duplicate": "<p>The selected server is the same as the old default server!</p>", "menu-2-prompt": "<p>The server's url: {baseUrl}</p>\n<p>Please enter the new server url:</p>\n<p>Enter 0 to return</p>", "menu-2-success": "<p>Modified successfully!</p>", "menu-2-invalid-url": "<p>Invalid URL format! Please enter a valid url address.</p>", "menu-2-too-many-attempts": "<p>Too many attempts. Operation cancelled.</p>", "menu-3-success": "<p>Deleted successfully!</p>", "menu-4-prompt": "<p>Enter a new name, no spaces allowed:</p>", "menu-4-error-invalid-name": "<p>No spaces allowed! Please try again o(一︿一+)o</p>", "menu-4-success": "<p>Modified successfully!</p>", "add-type": "<p>Please select the server type:</p>\n{server_type_list}", "add-url": "<p>Please enter the server url:</p>", "add-invalid-url": "<p>Invalid URL format! Please enter a valid url address.</p>", "add-too-many-attempts": "<p>Too many attempts. Operation cancelled.</p>", "add-name": "<p>Received! Please give the server a name, no spaces allowed:</p>", "add-invalid-name": "<p>No spaces allowed! Please try again o(一︿一+)o</p>", "add-success": "<p>Added successfully, the server information is as follows:</p>\n<p>[{serverName}]</p>\n<p>Type: {serverType}</p>" } } } };
2274
2275
 
2275
2276
  // src/core/locales/zh-CN.yml
2276
- var zh_CN_default2 = { _config: { $desc: "Core 模块设置", adminUsers: "**插件管理员** 的用户id (使用 inspect 指令获取)", guildNameCards: "**群聊卡片** 的名称列表", maoServerUrl: "**猫网服务器** 的 URL 地址", official_support_url: "**官方支持** 的 URL 地址" }, commands: { maintain: { description: "切换到维护模式", messages: { "no-auth": "<p>你没有权限使用本功能哦~</p>", start: "<p>正在进入维护模式</p>", "success-start": "<p>成功切换到维护模式</p>", stop: "<p>正在退出维护模式</p>", "success-stop": "<p>成功退出维护模式</p>" } }, timeout: "Noah 没等到你的回复,请重试!", help: { description: "显示 Noah 帮助信息", messages: { content: "<p>使用文档:</p>\nhttps://docs.logthm.cn/noah" } }, locale: { description: "设置语言", messages: { "no-auth": "<p>只有群管理员能使用本功能哦~</p>", "invalid-select": "<p>没有该选项!</p>", quit: "<p>已退出~</p>", "reset-channel": "<p>重置成功!</p>", "reset-user": "<p>重置成功!</p>", success: "<p>设置成功!</p>", "set-channel": "<p>选择群聊默认使用的语言:</p>\n<p>1. 简体中文</p>\n<p>2. English</p>\n<p>q. 退出</p>", "set-user": "<p>选择你使用的语言:</p>\n<p>1. 简体中文</p>\n<p>2. English</p>\n<p>q. 退出</p>" } }, link: { description: "关联账号到其他平台", options: { remove: "解除关联" }, messages: { "generated-1": "<p>Link 指令可用于在多个平台间关联用户数据。关联过程中,原始平台的用户数据将完全保留,而目标平台的用户数据将被原始平台的数据所覆盖。</p>\n<p>请确认当前平台是你的目标平台,并在 5 分钟内使用你的账号在原始平台内向机器人发送以下文本:</p>\n<p>{0}</p>\n<p>关联完成后,你可以随时使用「link -r」来解除关联。</p>", "generated-2": "<p>令牌核验成功!下面将进行第二步操作。</p>\n<p>请在 5 分钟内使用你的账号在目标平台内向机器人发送以下文本:</p>\n<p>{0}</p>\n<p>注意:当前平台是你的原始平台,这里的用户数据将覆盖目标平台的数据。</p>", "self-1": "<p>请前往原始平台输入。</p>", "self-2": "<p>请前往目标平台输入。</p>", success: "<p>账号关联成功!</p>", "remove-success": "<p>账号解除关联成功!</p>", "remove-original": "<p>无法解除关联:这是你的原始账号。</p>" } }, bind: { description: "绑定卡片", messages: { prompt: "<p>请输入你的卡号:</p>", "convert-access-failed": "<p>转换 Access Code 失败,请使用 16 位卡号进行绑定。</p>", "invalid-code": "<p>卡号不对哟,不记得的话去机台刷一下吧~</p>", name: "<p>收到!为这张卡取一个名字吧,不要带空格哦:</p>", "invalid-name": "<p>名字不要带空格!重来重来 o(一︿一+)o</p>", success: "<p>绑好啦,你的卡片信息如下:</p>\n<p>[{cardName}]</p>\n<p>{cardCode}</p>" } }, card: { description: "管理卡片", options: { detail: "显示卡片详细信息" }, messages: { "invalid-code": "<p>卡号不对哟,不记得的话去机台刷一下吧~</p>", "invalid-select": "<p>没有该选项!</p>", quit: "<p>已退出~</p>", "lookup-error": "查询失败: {message}", "lookup-error-unknown": "查询失败: 未知错误", "menu-select": "<p>[卡片管理]</p>\n{card_list}\n<p>0. 添加新卡片</p>\n<p>q. 退出菜单</p>\n<p>请输入序号:</p>", menu: "<p>[{name}]</p>\n<p>1. 设为默认卡片</p>\n<p>2. 查看或修改卡号</p>\n<p>3. 删除该卡</p>\n<p>4. 重命名该卡片</p>\n<p>5. 将卡片与指定服务器绑定</p>\n<p>0. 返回卡片选择</p>\n<p>q. 退出菜单</p>\n<p>请输入序号:</p>", "menu-has-bound-server": "<p>[{name}]</p>\n<p>已绑定服务器:{defaultServerName}</p>\n<p>1. 设为默认卡片</p>\n<p>2. 查看或修改卡号</p>\n<p>3. 删除该卡</p>\n<p>4. 重命名该卡片</p>\n<p>5. 将卡片与指定服务器绑定</p>\n<p>0. 返回卡片选择</p>\n<p>q. 退出菜单</p>\n<p>请输入序号:</p>", "menu-1-success": "<p>设置成功!</p>", "menu-1-error-duplicate": "<p>选择的卡片与旧的默认卡片相同!</p>", "menu-2-prompt": "<p>卡号:{code}</p>\n<p>请输入新的卡号:</p>\n<p>0. 返回</p>\n<p>q. 退出</p>", "menu-2-success": "<p>修改成功!</p>", "menu-2-error-invalid-code": "<p>卡号不对哟,不记得的话去机台刷一下吧~</p>", "menu-3-success": "<p>已删除!</p>", "menu-4-prompt": "<p>输入一个新名字,不要带空格哦:</p>\n<p>q. 退出</p>", "menu-4-error-invalid-name": "<p>名字不要带空格!重来重来 o(一︿一+)o</p>", "menu-4-success": "<p>修改成功!</p>", "menu-5": "<p>请选择一个服务器:</p>\n{server_list}\n<p>q. 退出</p>", "menu-5-success": "<p>设置成功!</p>", "menu-5-error-duplicate": "<p>选择的服务器与旧的默认服务器相同!</p>" } }, server: { description: "管理服务器", messages: { "no-channel": "<p>请在群聊中使用本功能哦~</p>", "invalid-select": "<p>没有该选项!</p>", "no-auth": "<p>只有群管理员能使用本功能哦~</p>", quit: "<p>已退出~</p>", "admin-menu-select": "<p>[群聊服务器管理]</p>\n{server_list}\n<p>0. 添加新服务器</p>\n<p>q. 退出菜单</p>\n<p>请输入序号:</p>", "menu-select": "<p>[服务器管理]</p>\n{server_list}\n<p>0. 添加新服务器</p>\n<p>q. 退出菜单</p>\n<p>请输入序号:</p>", menu: "<p>[{name}]</p>\n<p>类型:{type}</p>\n<p>1. 设为默认服务器</p>\n<p>2. 查看或修改 url</p>\n<p>3. 删除该服务器</p>\n<p>4. 重命名该服务器</p>\n<p>0. 返回服务器选择</p>\n<p>q. 退出菜单</p>\n<p>请输入序号:</p>", "menu-1-success": "<p>设置成功!</p>", "menu-1-error-duplicate": "<p>选择的服务器与旧的默认服务器相同!</p>", "menu-2-prompt": "<p>该服务器的 url:{baseUrl}</p>\n<p>请输入新的服务器 url:</p>\n<p>0. 返回</p>\n<p>q. 退出</p>", "menu-2-success": "<p>修改成功!</p>", "menu-2-invalid-url": "<p>URL 格式不正确!请输入有效的 url 地址。</p>", "menu-2-too-many-attempts": "<p>尝试次数过多,操作已取消。</p>", "menu-3-success": "<p>已删除!</p>", "menu-4-prompt": "<p>输入一个新名字,不要带空格哦:</p>\n<p>0. 返回</p>\n<p>q. 退出</p>", "menu-4-error-invalid-name": "<p>名字不要带空格!重来重来 o(一︿一+)o</p>", "menu-4-success": "<p>修改成功!</p>", "add-type": "<p>请选择服务器的类型:</p>\n{server_type_list}\n<p>q. 退出</p>", "add-url": "<p>请输入服务器的 url:</p>\n<p>q. 退出</p>", "add-invalid-url": "<p>URL 格式不正确!请输入有效的 url 地址。</p>", "add-too-many-attempts": "<p>尝试次数过多,操作已取消。</p>", "add-name": "<p>收到!为服务器取一个名字吧,不要带空格哦:</p>\n<p>q. 退出</p>", "add-invalid-name": "<p>名字不要带空格!重来重来 o(一︿一+)o</p>", "add-success": "<p>添加成功啦,服务器信息如下:</p>\n<p>[{serverName}]</p>\n<p>类型:{serverType}</p>" } } } };
2277
+ var zh_CN_default2 = { _config: { $desc: "Core 模块设置", adminUsers: "**插件管理员** 的用户id (使用 inspect 指令获取)", guildNameCards: "**群聊卡片** 的名称列表", maoServerUrl: "**猫网服务器** 的 URL 地址", official_support_url: "**官方支持** 的 URL 地址" }, commands: { maintain: { description: "切换到维护模式", messages: { "no-auth": "<p>你没有权限使用本功能哦~</p>", start: "<p>正在进入维护模式</p>", "success-start": "<p>成功切换到维护模式</p>", stop: "<p>正在退出维护模式</p>", "success-stop": "<p>成功退出维护模式</p>" } }, timeout: "Noah 没等到你的回复,请重试!", help: { description: "显示 Noah 帮助信息", messages: { content: "<p>使用文档:</p>\n<p>https://docs.logthm.cn/noah</p>", "qq-extra": "<p>遇到问题了?加群 723977027 反馈~</p>" } }, locale: { description: "设置语言", messages: { "no-auth": "<p>只有群管理员能使用本功能哦~</p>", "invalid-select": "<p>没有该选项!</p>", quit: "<p>已退出~</p>", "reset-channel": "<p>重置成功!</p>", "reset-user": "<p>重置成功!</p>", success: "<p>设置成功!</p>", "set-channel": "<p>选择群聊默认使用的语言:</p>\n<p>1. 简体中文</p>\n<p>2. English</p>\n<p>q. 退出</p>", "set-user": "<p>选择你使用的语言:</p>\n<p>1. 简体中文</p>\n<p>2. English</p>\n<p>q. 退出</p>" } }, link: { description: "关联账号到其他平台", options: { remove: "解除关联" }, messages: { "generated-1": "<p>Link 指令可用于在多个平台间关联用户数据。关联过程中,原始平台的用户数据将完全保留,而目标平台的用户数据将被原始平台的数据所覆盖。</p>\n<p>请确认当前平台是你的目标平台,并在 5 分钟内使用你的账号在原始平台内向机器人发送以下文本:</p>\n<p>{0}</p>\n<p>关联完成后,你可以随时使用「link -r」来解除关联。</p>", "generated-2": "<p>令牌核验成功!下面将进行第二步操作。</p>\n<p>请在 5 分钟内使用你的账号在目标平台内向机器人发送以下文本:</p>\n<p>{0}</p>\n<p>注意:当前平台是你的原始平台,这里的用户数据将覆盖目标平台的数据。</p>", "self-1": "<p>请前往原始平台输入。</p>", "self-2": "<p>请前往目标平台输入。</p>", success: "<p>账号关联成功!</p>", "remove-success": "<p>账号解除关联成功!</p>", "remove-original": "<p>无法解除关联:这是你的原始账号。</p>" } }, bind: { description: "绑定卡片", messages: { prompt: "<p>请输入你的卡号:</p>", "convert-access-failed": "<p>转换 Access Code 失败,请使用 16 位卡号进行绑定。</p>", "invalid-code": "<p>卡号不对哟,不记得的话去机台刷一下吧~</p>", name: "<p>收到!为这张卡取一个名字吧,不要带空格哦:</p>", "invalid-name": "<p>名字不要带空格!重来重来 o(一︿一+)o</p>", success: "<p>绑好啦,你的卡片信息如下:</p>\n<p>[{cardName}]</p>\n<p>{cardCode}</p>" } }, card: { description: "管理卡片", options: { detail: "显示卡片详细信息" }, messages: { "invalid-code": "<p>卡号不对哟,不记得的话去机台刷一下吧~</p>", "invalid-select": "<p>没有该选项!</p>", quit: "<p>已退出~</p>", "lookup-error": "查询失败: {message}", "lookup-error-unknown": "查询失败: 未知错误", "menu-select": "<p>[卡片管理]</p>\n{card_list}\n<p>0. 添加新卡片</p>\n<p>q. 退出菜单</p>\n<p>请输入序号:</p>", menu: "<p>[{name}]</p>\n<p>1. 设为默认卡片</p>\n<p>2. 查看或修改卡号</p>\n<p>3. 删除该卡</p>\n<p>4. 重命名该卡片</p>\n<p>5. 将卡片与指定服务器绑定</p>\n<p>0. 返回卡片选择</p>\n<p>q. 退出菜单</p>\n<p>请输入序号:</p>", "menu-has-bound-server": "<p>[{name}]</p>\n<p>已绑定服务器:{defaultServerName}</p>\n<p>1. 设为默认卡片</p>\n<p>2. 查看或修改卡号</p>\n<p>3. 删除该卡</p>\n<p>4. 重命名该卡片</p>\n<p>5. 将卡片与指定服务器绑定</p>\n<p>0. 返回卡片选择</p>\n<p>q. 退出菜单</p>\n<p>请输入序号:</p>", "menu-1-success": "<p>设置成功!</p>", "menu-1-error-duplicate": "<p>选择的卡片与旧的默认卡片相同!</p>", "menu-2-prompt": "<p>卡号:{code}</p>\n<p>请输入新的卡号:</p>\n<p>0. 返回</p>\n<p>q. 退出</p>", "menu-2-success": "<p>修改成功!</p>", "menu-2-error-invalid-code": "<p>卡号不对哟,不记得的话去机台刷一下吧~</p>", "menu-3-success": "<p>已删除!</p>", "menu-4-prompt": "<p>输入一个新名字,不要带空格哦:</p>\n<p>q. 退出</p>", "menu-4-error-invalid-name": "<p>名字不要带空格!重来重来 o(一︿一+)o</p>", "menu-4-success": "<p>修改成功!</p>", "menu-5": "<p>请选择一个服务器:</p>\n{server_list}\n<p>q. 退出</p>", "menu-5-success": "<p>设置成功!</p>", "menu-5-error-duplicate": "<p>选择的服务器与旧的默认服务器相同!</p>" } }, server: { description: "管理服务器", messages: { "no-channel": "<p>请在群聊中使用本功能哦~</p>", "invalid-select": "<p>没有该选项!</p>", "no-auth": "<p>只有群管理员能使用本功能哦~</p>", quit: "<p>已退出~</p>", "admin-menu-select": "<p>[群聊服务器管理]</p>\n{server_list}\n<p>0. 添加新服务器</p>\n<p>q. 退出菜单</p>\n<p>请输入序号:</p>", "menu-select": "<p>[服务器管理]</p>\n{server_list}\n<p>0. 添加新服务器</p>\n<p>q. 退出菜单</p>\n<p>请输入序号:</p>", menu: "<p>[{name}]</p>\n<p>类型:{type}</p>\n<p>1. 设为默认服务器</p>\n<p>2. 查看或修改 url</p>\n<p>3. 删除该服务器</p>\n<p>4. 重命名该服务器</p>\n<p>0. 返回服务器选择</p>\n<p>q. 退出菜单</p>\n<p>请输入序号:</p>", "menu-1-success": "<p>设置成功!</p>", "menu-1-error-duplicate": "<p>选择的服务器与旧的默认服务器相同!</p>", "menu-2-prompt": "<p>该服务器的 url:{baseUrl}</p>\n<p>请输入新的服务器 url:</p>\n<p>0. 返回</p>\n<p>q. 退出</p>", "menu-2-success": "<p>修改成功!</p>", "menu-2-invalid-url": "<p>URL 格式不正确!请输入有效的 url 地址。</p>", "menu-2-too-many-attempts": "<p>尝试次数过多,操作已取消。</p>", "menu-3-success": "<p>已删除!</p>", "menu-4-prompt": "<p>输入一个新名字,不要带空格哦:</p>\n<p>0. 返回</p>\n<p>q. 退出</p>", "menu-4-error-invalid-name": "<p>名字不要带空格!重来重来 o(一︿一+)o</p>", "menu-4-success": "<p>修改成功!</p>", "add-type": "<p>请选择服务器的类型:</p>\n{server_type_list}\n<p>q. 退出</p>", "add-url": "<p>请输入服务器的 url:</p>\n<p>q. 退出</p>", "add-invalid-url": "<p>URL 格式不正确!请输入有效的 url 地址。</p>", "add-too-many-attempts": "<p>尝试次数过多,操作已取消。</p>", "add-name": "<p>收到!为服务器取一个名字吧,不要带空格哦:</p>\n<p>q. 退出</p>", "add-invalid-name": "<p>名字不要带空格!重来重来 o(一︿一+)o</p>", "add-success": "<p>添加成功啦,服务器信息如下:</p>\n<p>[{serverName}]</p>\n<p>类型:{serverType}</p>" } } } };
2277
2278
 
2278
2279
  // src/core/index.ts
2279
2280
  var name5 = "Noah-Core";
@@ -2667,12 +2668,12 @@ function getNextVFIncrease(level, currentScore, clearType) {
2667
2668
  }
2668
2669
  __name(getNextVFIncrease, "getNextVFIncrease");
2669
2670
  function getGradeRange(grade) {
2670
- if (!grade) return ALL_GRADES;
2671
+ if (!grade) return ALL_GRADES.slice(0, ALL_GRADES.indexOf("A") + 1);
2671
2672
  return Array.isArray(grade) ? grade : [grade];
2672
2673
  }
2673
2674
  __name(getGradeRange, "getGradeRange");
2674
2675
  function getClearTypeRange(clearType) {
2675
- if (!clearType) return ALL_CLEAR_TYPES;
2676
+ if (!clearType) return ALL_CLEAR_TYPES.slice(0, ALL_CLEAR_TYPES.indexOf("NC") + 1);
2676
2677
  return Array.isArray(clearType) ? clearType : [clearType];
2677
2678
  }
2678
2679
  __name(getClearTypeRange, "getClearTypeRange");
@@ -2888,7 +2889,20 @@ function generateQueryResults(params) {
2888
2889
  uniqueResults.push(result);
2889
2890
  }
2890
2891
  }
2891
- const filteredResults = uniqueResults.filter((result) => result.clearType !== "S-PUC");
2892
+ const excludeLevelSet = params.excludeLevel ? new Set(params.excludeLevel.map((l) => Math.round(l * 10))) : null;
2893
+ const excludeScoreSet = params.excludeScore ? new Set(params.excludeScore) : null;
2894
+ const excludeGradeSet = params.excludeGrade ? new Set(params.excludeGrade) : null;
2895
+ const excludeClearTypeSet = params.excludeClearType ? new Set(params.excludeClearType) : null;
2896
+ const excludeVfSet = params.excludeVf ? new Set(params.excludeVf.map((v) => Math.round(v * 20))) : null;
2897
+ const afterExclusion = uniqueResults.filter((result) => {
2898
+ if (excludeLevelSet && excludeLevelSet.has(Math.round(result.level * 10))) return false;
2899
+ if (excludeScoreSet && excludeScoreSet.has(result.score)) return false;
2900
+ if (excludeGradeSet && excludeGradeSet.has(result.grade)) return false;
2901
+ if (excludeClearTypeSet && excludeClearTypeSet.has(result.clearType)) return false;
2902
+ if (excludeVfSet && excludeVfSet.has(Math.round(result.vf * 20))) return false;
2903
+ return true;
2904
+ });
2905
+ const filteredResults = afterExclusion.filter((result) => result.clearType !== "S-PUC");
2892
2906
  return filteredResults.sort((a, b) => b.vf - a.vf);
2893
2907
  }
2894
2908
  __name(generateQueryResults, "generateQueryResults");
@@ -5387,6 +5401,249 @@ function parseRadarFeature(item) {
5387
5401
  return null;
5388
5402
  }
5389
5403
  __name(parseRadarFeature, "parseRadarFeature");
5404
+ function extractOperator(item) {
5405
+ if (item.startsWith(">=")) return { op: ">=", value: item.slice(2) };
5406
+ if (item.startsWith("<=")) return { op: "<=", value: item.slice(2) };
5407
+ if (item.startsWith("!=")) return { op: "!=", value: item.slice(2) };
5408
+ if (item.startsWith(">")) return { op: ">", value: item.slice(1) };
5409
+ if (item.startsWith("<")) return { op: "<", value: item.slice(1) };
5410
+ if (item.startsWith("=")) return { op: "=", value: item.slice(1) };
5411
+ if (item.startsWith("~")) return { op: "~", value: item.slice(1) };
5412
+ return { op: null, value: item };
5413
+ }
5414
+ __name(extractOperator, "extractOperator");
5415
+ function getAllValidLevels2() {
5416
+ const levels = [];
5417
+ for (let i = 1; i <= 16; i++) levels.push(i);
5418
+ levels.push(17, 17.5);
5419
+ for (let scaled = 180; scaled <= 209; scaled++) levels.push(scaled / 10);
5420
+ return levels;
5421
+ }
5422
+ __name(getAllValidLevels2, "getAllValidLevels");
5423
+ function applyLevelOperator(op, levels) {
5424
+ const allLevels = getAllValidLevels2();
5425
+ const value = levels[0];
5426
+ if (op === "=") return { include: levels, exclude: [] };
5427
+ if (op === "!=") return { include: [], exclude: levels };
5428
+ if (op === "~") {
5429
+ const result = /* @__PURE__ */ new Set();
5430
+ for (const lv of levels) {
5431
+ const idx2 = allLevels.indexOf(lv);
5432
+ if (idx2 === -1) continue;
5433
+ if (idx2 > 0) result.add(allLevels[idx2 - 1]);
5434
+ result.add(allLevels[idx2]);
5435
+ if (idx2 < allLevels.length - 1) result.add(allLevels[idx2 + 1]);
5436
+ }
5437
+ return { include: [...result], exclude: [] };
5438
+ }
5439
+ const idx = allLevels.indexOf(value);
5440
+ if (idx === -1) return { include: levels, exclude: [] };
5441
+ switch (op) {
5442
+ case ">":
5443
+ return { include: allLevels.slice(idx + 1), exclude: [] };
5444
+ case ">=":
5445
+ return { include: allLevels.slice(idx), exclude: [] };
5446
+ case "<":
5447
+ return { include: allLevels.slice(0, idx), exclude: [] };
5448
+ case "<=":
5449
+ return { include: allLevels.slice(0, idx + 1), exclude: [] };
5450
+ }
5451
+ }
5452
+ __name(applyLevelOperator, "applyLevelOperator");
5453
+ function applyScoreOperator(op, scores) {
5454
+ const value = scores[0];
5455
+ if (op === "=") return { include: [value], exclude: [] };
5456
+ if (op === "!=") return { include: [], exclude: [value] };
5457
+ if (op === "~") {
5458
+ return { include: [value - 5e4, value + 5e4], exclude: [] };
5459
+ }
5460
+ switch (op) {
5461
+ case ">":
5462
+ return { include: [value + 1, 1e7], exclude: [] };
5463
+ case ">=":
5464
+ return { include: [value, 1e7], exclude: [] };
5465
+ case "<":
5466
+ return { include: [0, value - 1], exclude: [] };
5467
+ case "<=":
5468
+ return { include: [0, value], exclude: [] };
5469
+ }
5470
+ }
5471
+ __name(applyScoreOperator, "applyScoreOperator");
5472
+ function applyVfOperator(op, vfValue) {
5473
+ if (op === "=") return { include: vfValue, exclude: [] };
5474
+ if (op === "!=") return { include: [], exclude: [vfValue] };
5475
+ if (op === "~") {
5476
+ return { include: [vfValue - 0.25, vfValue + 0.25], exclude: [] };
5477
+ }
5478
+ switch (op) {
5479
+ case ">":
5480
+ return { include: [vfValue + 0.05, 99], exclude: [] };
5481
+ case ">=":
5482
+ return { include: [vfValue, 99], exclude: [] };
5483
+ case "<":
5484
+ return { include: [0, vfValue - 0.05], exclude: [] };
5485
+ case "<=":
5486
+ return { include: [0, vfValue], exclude: [] };
5487
+ }
5488
+ }
5489
+ __name(applyVfOperator, "applyVfOperator");
5490
+ function applyGradeOperator(op, grade) {
5491
+ const idx = ALL_GRADES.indexOf(grade);
5492
+ if (idx === -1) return { include: [grade], exclude: [] };
5493
+ if (op === "=") return { include: [grade], exclude: [] };
5494
+ if (op === "!=") return { include: [], exclude: [grade] };
5495
+ if (op === "~") {
5496
+ const result = [];
5497
+ if (idx > 0) result.push(ALL_GRADES[idx - 1]);
5498
+ result.push(ALL_GRADES[idx]);
5499
+ if (idx < ALL_GRADES.length - 1) result.push(ALL_GRADES[idx + 1]);
5500
+ return { include: result, exclude: [] };
5501
+ }
5502
+ switch (op) {
5503
+ case ">":
5504
+ return { include: ALL_GRADES.slice(0, idx), exclude: [] };
5505
+ case ">=":
5506
+ return { include: ALL_GRADES.slice(0, idx + 1), exclude: [] };
5507
+ case "<":
5508
+ return { include: ALL_GRADES.slice(idx + 1), exclude: [] };
5509
+ case "<=":
5510
+ return { include: ALL_GRADES.slice(idx), exclude: [] };
5511
+ }
5512
+ }
5513
+ __name(applyGradeOperator, "applyGradeOperator");
5514
+ function applyClearTypeOperator(op, clearType) {
5515
+ const idx = ALL_CLEAR_TYPES.indexOf(clearType);
5516
+ if (idx === -1) return { include: [clearType], exclude: [] };
5517
+ if (op === "=") return { include: [clearType], exclude: [] };
5518
+ if (op === "!=") return { include: [], exclude: [clearType] };
5519
+ if (op === "~") {
5520
+ const result = [];
5521
+ if (idx > 0) result.push(ALL_CLEAR_TYPES[idx - 1]);
5522
+ result.push(ALL_CLEAR_TYPES[idx]);
5523
+ if (idx < ALL_CLEAR_TYPES.length - 1) result.push(ALL_CLEAR_TYPES[idx + 1]);
5524
+ return { include: result, exclude: [] };
5525
+ }
5526
+ switch (op) {
5527
+ case ">":
5528
+ return { include: ALL_CLEAR_TYPES.slice(0, idx), exclude: [] };
5529
+ case ">=":
5530
+ return { include: ALL_CLEAR_TYPES.slice(0, idx + 1), exclude: [] };
5531
+ case "<":
5532
+ return { include: ALL_CLEAR_TYPES.slice(idx + 1), exclude: [] };
5533
+ case "<=":
5534
+ return { include: ALL_CLEAR_TYPES.slice(idx), exclude: [] };
5535
+ }
5536
+ }
5537
+ __name(applyClearTypeOperator, "applyClearTypeOperator");
5538
+ function mergeLevels(params, levels) {
5539
+ if (params.level !== void 0) {
5540
+ const existing = Array.isArray(params.level) ? params.level : [params.level];
5541
+ params.level = [.../* @__PURE__ */ new Set([...existing, ...levels])];
5542
+ } else {
5543
+ params.level = levels.length === 1 ? levels[0] : levels;
5544
+ }
5545
+ }
5546
+ __name(mergeLevels, "mergeLevels");
5547
+ function mergeScores(params, scores) {
5548
+ if (params.score !== void 0) {
5549
+ const existing = Array.isArray(params.score) ? params.score : [params.score];
5550
+ params.score = [.../* @__PURE__ */ new Set([...existing, ...scores])];
5551
+ } else {
5552
+ params.score = scores.length === 1 ? scores[0] : scores;
5553
+ }
5554
+ }
5555
+ __name(mergeScores, "mergeScores");
5556
+ function mergeVf(params, vf2) {
5557
+ if (params.vf !== void 0) {
5558
+ const existing = Array.isArray(params.vf) ? params.vf : [params.vf];
5559
+ const newVf = Array.isArray(vf2) ? vf2 : [vf2];
5560
+ params.vf = [...existing, ...newVf];
5561
+ } else {
5562
+ params.vf = vf2;
5563
+ }
5564
+ }
5565
+ __name(mergeVf, "mergeVf");
5566
+ function mergeGrades(params, grades) {
5567
+ if (params.grade) {
5568
+ const existing = Array.isArray(params.grade) ? params.grade : [params.grade];
5569
+ params.grade = [.../* @__PURE__ */ new Set([...existing, ...grades])];
5570
+ } else {
5571
+ params.grade = grades.length === 1 ? grades[0] : grades;
5572
+ }
5573
+ }
5574
+ __name(mergeGrades, "mergeGrades");
5575
+ function mergeClearTypes(params, clearTypes) {
5576
+ if (params.clearType) {
5577
+ const existing = Array.isArray(params.clearType) ? params.clearType : [params.clearType];
5578
+ params.clearType = [.../* @__PURE__ */ new Set([...existing, ...clearTypes])];
5579
+ } else {
5580
+ params.clearType = clearTypes;
5581
+ }
5582
+ }
5583
+ __name(mergeClearTypes, "mergeClearTypes");
5584
+ function parseWithOperator(params, op, value) {
5585
+ const vf2 = parseVfValue(value);
5586
+ if (vf2 !== null) {
5587
+ const vfNum = Array.isArray(vf2) ? vf2[0] : vf2;
5588
+ const result = applyVfOperator(op, vfNum);
5589
+ if (result.exclude.length > 0) {
5590
+ params.excludeVf = [...params.excludeVf || [], ...result.exclude];
5591
+ }
5592
+ if (Array.isArray(result.include) && result.include.length > 0) {
5593
+ mergeVf(params, result.include);
5594
+ } else if (typeof result.include === "number") {
5595
+ mergeVf(params, result.include);
5596
+ }
5597
+ return true;
5598
+ }
5599
+ const levels = parseLevelRange(value);
5600
+ if (levels !== null && levels.length === 1) {
5601
+ const result = applyLevelOperator(op, levels);
5602
+ if (result.exclude.length > 0) {
5603
+ params.excludeLevel = [...params.excludeLevel || [], ...result.exclude];
5604
+ }
5605
+ if (result.include.length > 0) {
5606
+ mergeLevels(params, result.include);
5607
+ }
5608
+ return true;
5609
+ }
5610
+ const scores = parseScoreRange(value);
5611
+ if (scores !== null && scores.length === 1) {
5612
+ const result = applyScoreOperator(op, scores);
5613
+ if (result.exclude.length > 0) {
5614
+ params.excludeScore = [...params.excludeScore || [], ...result.exclude];
5615
+ }
5616
+ if (result.include.length > 0) {
5617
+ mergeScores(params, result.include);
5618
+ }
5619
+ return true;
5620
+ }
5621
+ const singleClearTypes = parseSingleClearType(value);
5622
+ if (singleClearTypes !== null) {
5623
+ const ct = singleClearTypes[0];
5624
+ const result = applyClearTypeOperator(op, ct);
5625
+ if (result.exclude.length > 0) {
5626
+ params.excludeClearType = [...params.excludeClearType || [], ...result.exclude];
5627
+ }
5628
+ if (result.include.length > 0) {
5629
+ mergeClearTypes(params, result.include);
5630
+ }
5631
+ return true;
5632
+ }
5633
+ const singleGrades = parseSingleGrade(value);
5634
+ if (singleGrades !== null) {
5635
+ const result = applyGradeOperator(op, singleGrades[0]);
5636
+ if (result.exclude.length > 0) {
5637
+ params.excludeGrade = [...params.excludeGrade || [], ...result.exclude];
5638
+ }
5639
+ if (result.include.length > 0) {
5640
+ mergeGrades(params, result.include);
5641
+ }
5642
+ return true;
5643
+ }
5644
+ return false;
5645
+ }
5646
+ __name(parseWithOperator, "parseWithOperator");
5390
5647
  function parseQueryInput(input) {
5391
5648
  const params = {};
5392
5649
  if (!input || input.trim() === "") {
@@ -5394,6 +5651,10 @@ function parseQueryInput(input) {
5394
5651
  }
5395
5652
  const items = input.split(/\s+/).map((s) => s.trim()).filter(Boolean);
5396
5653
  for (const item of items) {
5654
+ const { op, value } = extractOperator(item);
5655
+ if (op) {
5656
+ if (parseWithOperator(params, op, value)) continue;
5657
+ }
5397
5658
  const vf2 = parseVfValue(item);
5398
5659
  if (vf2 !== null) {
5399
5660
  if (params.vf !== void 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koishi-plugin-noah",
3
- "version": "2.3.5",
3
+ "version": "2.3.7",
4
4
  "contributors": [
5
5
  "Logthm <logthm@outlook.com>"
6
6
  ],