koishi-plugin-starfx-bot 0.11.1 → 0.11.2
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 +8 -8
- package/package.json +1 -1
- package/readme.md +1 -0
package/lib/index.js
CHANGED
|
@@ -118,14 +118,6 @@ async function getImageSrc(session, param, option) {
|
|
|
118
118
|
} else if (noParam && !param?.length) {
|
|
119
119
|
return `https://q1.qlogo.cn/g?b=qq&nk=${session.userId}&s=640`;
|
|
120
120
|
}
|
|
121
|
-
const elementArray = session.elements;
|
|
122
|
-
for (const element of elementArray) {
|
|
123
|
-
if (img && element?.type === "img") {
|
|
124
|
-
return element?.attrs?.src;
|
|
125
|
-
} else if (at && element?.type === "at" && element?.attrs?.id) {
|
|
126
|
-
return `https://q1.qlogo.cn/g?b=qq&nk=${element.attrs.id}&s=640`;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
121
|
if (quote) {
|
|
130
122
|
const quoteElementArray = session?.quote?.elements;
|
|
131
123
|
if (quoteElementArray?.length) {
|
|
@@ -138,6 +130,14 @@ async function getImageSrc(session, param, option) {
|
|
|
138
130
|
}
|
|
139
131
|
}
|
|
140
132
|
}
|
|
133
|
+
const elementArray = session.elements;
|
|
134
|
+
for (const element of elementArray) {
|
|
135
|
+
if (img && element?.type === "img") {
|
|
136
|
+
return element?.attrs?.src;
|
|
137
|
+
} else if (at && element?.type === "at" && element?.attrs?.id) {
|
|
138
|
+
return `https://q1.qlogo.cn/g?b=qq&nk=${element.attrs.id}&s=640`;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
141
|
return "";
|
|
142
142
|
}
|
|
143
143
|
__name(getImageSrc, "getImageSrc");
|
package/package.json
CHANGED
package/readme.md
CHANGED