koishi-plugin-starfx-bot 0.13.2 → 0.13.4
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 +4 -5
- package/package.json +1 -1
- package/readme.md +25 -23
package/lib/index.js
CHANGED
|
@@ -502,13 +502,13 @@ function apply(ctx, cfg) {
|
|
|
502
502
|
if (cfg.openLock) {
|
|
503
503
|
ctx.command("封印 [param]").action(async ({ session }, param) => {
|
|
504
504
|
if (detectControl(controlJson, session.guildId, "lock"))
|
|
505
|
-
|
|
505
|
+
await session.send(await drawLock(ctx, await getImageSrc(session, param)));
|
|
506
506
|
});
|
|
507
507
|
}
|
|
508
508
|
if (cfg.openSold) {
|
|
509
509
|
ctx.command("卖掉了 [param]").action(async ({ session }, param) => {
|
|
510
510
|
if (detectControl(controlJson, session.guildId, "sold"))
|
|
511
|
-
|
|
511
|
+
await session.send(await drawSold(ctx, await getImageSrc(session, param)));
|
|
512
512
|
});
|
|
513
513
|
}
|
|
514
514
|
if (cfg.roll) {
|
|
@@ -541,7 +541,7 @@ function apply(ctx, cfg) {
|
|
|
541
541
|
if (!imgSrc?.length) return "输入无效";
|
|
542
542
|
const imageBase64 = await drawBanGDream(imgSrc, drawConfig);
|
|
543
543
|
await p;
|
|
544
|
-
|
|
544
|
+
await session.send(import_koishi2.h.image(imageBase64));
|
|
545
545
|
}
|
|
546
546
|
});
|
|
547
547
|
}
|
|
@@ -570,7 +570,7 @@ function apply(ctx, cfg) {
|
|
|
570
570
|
const filepath = await getRecord(cfg, session.gid.replace(":", "_"), tag);
|
|
571
571
|
starfxLogger.info(`send record: ${filepath}`);
|
|
572
572
|
if (!filepath) return "暂无语录呢";
|
|
573
|
-
|
|
573
|
+
await session.send(import_koishi2.h.image(filepath));
|
|
574
574
|
}
|
|
575
575
|
});
|
|
576
576
|
}
|
|
@@ -609,7 +609,6 @@ function apply(ctx, cfg) {
|
|
|
609
609
|
});
|
|
610
610
|
if (process.env.NODE_ENV === "development") {
|
|
611
611
|
ctx.command("test").action(async ({ session }) => {
|
|
612
|
-
await session.send(import_koishi2.h.video("https://video.twimg.com/amplify_video/1920672748596043776/vid/avc1/1080x1920/c3BNP3qg4-sT82fR.mp4?tag=21"));
|
|
613
612
|
});
|
|
614
613
|
}
|
|
615
614
|
function initAssets() {
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -22,7 +22,7 @@ StarFreedomX机器人的小功能,自用
|
|
|
22
22
|
|
|
23
23
|
* 修改BanG Dream!边框的绘制为使用sharp,加快速度
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
## 语录tag可视化控制
|
|
26
26
|
|
|
27
27
|
详情见[StarFreedomX/image-tag-editor-web: 为starfx-bot的语录功能可视化添加tag](https://github.com/StarFreedomX/image-tag-editor-web)
|
|
28
28
|
配置项的imageFolderPath填写Koishi数据文件夹下的/data/starfx-bot/record/
|
|
@@ -78,25 +78,27 @@ StarFreedomX机器人的小功能,自用
|
|
|
78
78
|
## 更新日志
|
|
79
79
|
|
|
80
80
|
|
|
81
|
-
| 版本 | 更新日志
|
|
82
|
-
|
|
83
|
-
| `0.0.1` | 加入封印功能
|
|
84
|
-
| `0.1.0` | 加入"卖掉了"功能
|
|
85
|
-
| `0.2.0` | 加入"艾特我又不说话"回复功能
|
|
86
|
-
| `0.3.0` | 加入"我喜欢你"和"我才不是机器人!"回复功能
|
|
87
|
-
| `0.4.0` | 更改处理库为sharp
|
|
88
|
-
| `0.5.0` | 加入BanG Dream!边框功能
|
|
89
|
-
| `0.6.0` | 加入群语录功能,修复一处bangdream绘制的bug
|
|
90
|
-
| `0.7.0` | 加入复读功能
|
|
91
|
-
| `0.8.0` | 将各个工具函数封装在utils.ts中,更改语录的触发方式
|
|
92
|
-
| `0.9.0` | 添加白名单/黑名单模式,对每个功能做过滤
|
|
93
|
-
| `0.10.0` | 添加随机数功能
|
|
94
|
-
| `0.10.1` | 修复随机数骰子功能输入负数报错的bug
|
|
95
|
-
| `0.10.2` | 增加roll功能的人称变化
|
|
96
|
-
| `0.11.0` | 增加适配于onebot(主要是qq)的撤回功能
|
|
97
|
-
| `0.11.1` | 修复bdbd传参错误问题
|
|
98
|
-
| `0.11.2` | 优化消息捕获图片逻辑
|
|
99
|
-
| `0.12.0` | 加入echo功能
|
|
100
|
-
| `0.13.0` | 语录支持tag以及调整权重
|
|
101
|
-
| `0.13.1` | 修复pure类型绘图名称错误
|
|
102
|
-
| `0.13.2` | 优化了tag在权重很大情况下的筛选效率
|
|
81
|
+
| 版本 | 更新日志 |
|
|
82
|
+
|----------|----------------------------------|
|
|
83
|
+
| `0.0.1` | 加入封印功能 |
|
|
84
|
+
| `0.1.0` | 加入"卖掉了"功能 |
|
|
85
|
+
| `0.2.0` | 加入"艾特我又不说话"回复功能 |
|
|
86
|
+
| `0.3.0` | 加入"我喜欢你"和"我才不是机器人!"回复功能 |
|
|
87
|
+
| `0.4.0` | 更改处理库为sharp |
|
|
88
|
+
| `0.5.0` | 加入BanG Dream!边框功能 |
|
|
89
|
+
| `0.6.0` | 加入群语录功能,修复一处bangdream绘制的bug |
|
|
90
|
+
| `0.7.0` | 加入复读功能 |
|
|
91
|
+
| `0.8.0` | 将各个工具函数封装在utils.ts中,更改语录的触发方式 |
|
|
92
|
+
| `0.9.0` | 添加白名单/黑名单模式,对每个功能做过滤 |
|
|
93
|
+
| `0.10.0` | 添加随机数功能 |
|
|
94
|
+
| `0.10.1` | 修复随机数骰子功能输入负数报错的bug |
|
|
95
|
+
| `0.10.2` | 增加roll功能的人称变化 |
|
|
96
|
+
| `0.11.0` | 增加适配于onebot(主要是qq)的撤回功能 |
|
|
97
|
+
| `0.11.1` | 修复bdbd传参错误问题 |
|
|
98
|
+
| `0.11.2` | 优化消息捕获图片逻辑 |
|
|
99
|
+
| `0.12.0` | 加入echo功能 |
|
|
100
|
+
| `0.13.0` | 语录支持tag以及调整权重 |
|
|
101
|
+
| `0.13.1` | 修复pure类型绘图名称错误 |
|
|
102
|
+
| `0.13.2` | 优化了tag在权重很大情况下的筛选效率 |
|
|
103
|
+
| `0.13.3` | 不再return图片对象,防止$()可能导致的参数溢出 |
|
|
104
|
+
| `0.13.3` | Re修订:不再return图片对象,防止$()可能导致的参数溢出 |
|