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.
- package/lib/index.js +1 -1
- 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);
|