@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.
- package/lib/core/index.d.ts +1 -1
- package/lib/core/index.js +2 -4
- package/package.json +1 -1
package/lib/core/index.d.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
276
|
+
getGroupAvatarUrl() {
|
|
279
277
|
return 'https://p.qlogo.cn/gh/967068507/967068507/0';
|
|
280
278
|
}
|
|
281
279
|
async GetCurrentAccount() {
|