@karinjs/adapter-qqbot 1.0.2 → 1.1.1

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/core/index.js CHANGED
@@ -163,6 +163,12 @@ export class AdapterQQBot {
163
163
  elements.push(segment.face(Number(Match[1])));
164
164
  }
165
165
  else {
166
+ const BotConfig = Config.getBotConfig(this.account.uid) || { regex: [] };
167
+ for (const reg of BotConfig.regex) {
168
+ if (typeof v === 'string') {
169
+ v = v.trim().replace(new RegExp(reg.reg), reg.rep);
170
+ }
171
+ }
166
172
  elements.push(segment.text(v));
167
173
  }
168
174
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karinjs/adapter-qqbot",
3
- "version": "1.0.2",
3
+ "version": "1.1.1",
4
4
  "author": "shijin",
5
5
  "type": "module",
6
6
  "description": "karin plugin template",