@karinjs/adapter-qqbot 1.2.4 → 1.2.6

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.
@@ -37,7 +37,7 @@ export declare class AdapterQQBot implements KarinAdapter {
37
37
  message_id: string;
38
38
  }>;
39
39
  getAvatarUrl(user_id: string, size?: number): string;
40
- getGroupAvatar(): string;
40
+ getGroupAvatarUrl(): string;
41
41
  GetCurrentAccount(): Promise<{
42
42
  account_uid: string;
43
43
  account_uin: string;
package/lib/core/index.js CHANGED
@@ -166,9 +166,7 @@ export class AdapterQQBot {
166
166
  const { regex } = Config.getBotConfig(this.account.uid) || { regex: [] };
167
167
  for (const r of regex) {
168
168
  const reg = r.reg;
169
- if (typeof reg !== 'string')
170
- continue;
171
- v = v.replace(reg, r.rep);
169
+ v = v.trim().replace(reg, r.rep);
172
170
  }
173
171
  elements.push(segment.text(v));
174
172
  }
@@ -275,7 +273,7 @@ export class AdapterQQBot {
275
273
  return this.super.avatar;
276
274
  return `https://q.qlogo.cn/qqapp/${this.account.uid}/${user_id}/${size}`;
277
275
  }
278
- getGroupAvatar() {
276
+ getGroupAvatarUrl() {
279
277
  return 'https://p.qlogo.cn/gh/967068507/967068507/0';
280
278
  }
281
279
  async GetCurrentAccount() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karinjs/adapter-qqbot",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "author": "shijin",
5
5
  "type": "module",
6
6
  "description": "karin plugin template",