koishi-plugin-prism 0.1.39 → 0.1.40

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 +1 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -787,7 +787,7 @@ ${table.players.map(player => player.name).join("、")}`),
787
787
  if (states.length === 0)
788
788
  return "没有找到任何设备状态。";
789
789
  if (alias) {
790
- const matched = states.find((d) => d.deviceId === alias || d.label === alias);
790
+ const matched = states.find((d) => d.deviceId === alias || d.label === alias || d.aliases?.some((value) => value.trim().toLowerCase() === alias.toLowerCase()));
791
791
  if (!matched)
792
792
  return `找不到设备: ${alias}`;
793
793
  const stateVal = normalizeDeviceState(matched.state);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koishi-plugin-prism",
3
- "version": "0.1.39",
3
+ "version": "0.1.40",
4
4
  "description": "PRiSM Next 计费与设备管理系统的 Koishi 机器人集成插件",
5
5
  "main": "./lib/index.js",
6
6
  "exports": {