koishi-plugin-starfx-bot 0.13.7 → 0.14.0

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 CHANGED
@@ -529,7 +529,11 @@ function apply(ctx, cfg) {
529
529
  if (detectControl(controlJson, session.guildId, "echo")) {
530
530
  const elements = session.elements;
531
531
  try {
532
- elements[0].attrs.content = elements[0].attrs?.content.split(" ").slice(1).join(" ");
532
+ if (elements[0].type === "at") elements.shift();
533
+ elements[0].attrs.content = elements[0].attrs?.content.trim().split(" ").slice(1).join(" ");
534
+ if (elements.length == 1 && !elements[0].attrs.content?.length) {
535
+ return session.quote?.elements;
536
+ }
533
537
  return elements;
534
538
  } catch (e) {
535
539
  return params;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "contributors": [
5
5
  "StarFreedomX <starfreedomx@outlook.com>"
6
6
  ],
7
- "version": "0.13.7",
7
+ "version": "0.14.0",
8
8
  "main": "lib/index.js",
9
9
  "typings": "lib/index.d.ts",
10
10
  "files": [
package/readme.md CHANGED
@@ -105,3 +105,4 @@ StarFreedomX机器人的小功能,自用
105
105
  | `0.13.5` | Re再修订:bdbd新增检测异常机制,防止$()可能导致的问题 |
106
106
  | `0.13.6` | 恢复误注释内容 |
107
107
  | `0.13.7` | 修复bdbd无param时出现的异常 |
108
+ | `0.14.0` | echo增加对引用消息的支持,且支持有at触发 |