koishi-plugin-starfx-bot 0.13.5 → 0.13.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/index.js CHANGED
@@ -141,6 +141,7 @@ async function getImageSrc(session, param, option) {
141
141
  if (quoteElementArray?.length) {
142
142
  for (const element of quoteElementArray) {
143
143
  if (img && element?.type === "img") {
144
+ return element?.attrs?.src;
144
145
  } else if (at && element?.type === "at" && element?.attrs?.id && element.attrs.id !== session.selfId) {
145
146
  return `https://q1.qlogo.cn/g?b=qq&nk=${element?.attrs?.id}&s=640`;
146
147
  }
@@ -540,12 +541,12 @@ function apply(ctx, cfg) {
540
541
  ctx.command("bdbd [param]").option("starNum", "-n <starNum: number>").option("color", "-c <color: string>").option("train", "-t <train: string>").option("band", "-b <band: string>").action(async ({ session, options }, param) => {
541
542
  if (detectControl(controlJson, session.guildId, "bdbd")) {
542
543
  const p = session.send("图片处理中请稍等...");
543
- console.log(param.slice(0, 100));
544
+ console.log(param.slice(0, 1e3));
544
545
  const drawConfig = await handleBanGDreamConfig(options);
545
546
  const imgSrc = await getImageSrc(session, param);
546
547
  if (!imgSrc?.length) return "输入无效";
547
548
  const imageBase64 = await drawBanGDream(imgSrc, drawConfig);
548
- if (!imageBase64?.length) return "输入无效";
549
+ if (!imageBase64?.length) return "输入无效...";
549
550
  await p;
550
551
  await session.send(import_koishi2.h.image(imageBase64));
551
552
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "contributors": [
5
5
  "StarFreedomX <starfreedomx@outlook.com>"
6
6
  ],
7
- "version": "0.13.5",
7
+ "version": "0.13.6",
8
8
  "main": "lib/index.js",
9
9
  "typings": "lib/index.d.ts",
10
10
  "files": [
package/readme.md CHANGED
@@ -103,3 +103,4 @@ StarFreedomX机器人的小功能,自用
103
103
  | `0.13.3` | 不再return图片对象,防止$()可能导致的参数溢出 |
104
104
  | `0.13.4` | Re修订:不再return图片对象,防止$()可能导致的参数溢出 |
105
105
  | `0.13.5` | Re再修订:bdbd新增检测异常机制,防止$()可能导致的问题 |
106
+ | `0.13.6` | 恢复误注释内容 |