koishi-plugin-bilibili-notify 1.2.3 → 1.2.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.
@@ -171,7 +171,10 @@ class ComRegister {
171
171
  })
172
172
  // 使用sharp调整图片大小
173
173
  const resizedImage = await sharp(resp.data)
174
- .resize(100, 100)
174
+ .resize(100, 100, {
175
+ kernel: sharp.kernel.lanczos3
176
+ })
177
+ .png({ compressionLevel: 9 })
175
178
  .toBuffer()
176
179
  // 发送下播提示语
177
180
  await session.send(
@@ -732,6 +735,8 @@ class ComRegister {
732
735
  this.logger.info('重启插件成功');
733
736
  }
734
737
  else {
738
+ // logger
739
+ this.logger.error('已重启插件三次,请检查机器人状态后手动重启');
735
740
  // 重启失败,发送消息
736
741
  await this.sendPrivateMsg(bot, '已重启插件三次,请检查机器人状态后手动重启');
737
742
  // 关闭插件
@@ -1009,7 +1014,10 @@ class ComRegister {
1009
1014
  });
1010
1015
  // 使用sharp调整图片大小
1011
1016
  const resizedImage = await (0, sharp_1.default)(resp.data)
1012
- .resize(100, 100)
1017
+ .resize(100, 100, {
1018
+ kernel: sharp_1.default.kernel.lanczos3
1019
+ })
1020
+ .png({ compressionLevel: 9 })
1013
1021
  .toBuffer();
1014
1022
  // 发送下播通知
1015
1023
  await this.sendMsg(ctx, guildId, bot, (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [koishi_1.h.image(resizedImage, 'image/png'), " ", liveEndMsg] }));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-bilibili-notify",
3
3
  "description": "Koishi bilibili notify plugin",
4
- "version": "1.2.3",
4
+ "version": "1.2.4",
5
5
  "contributors": [
6
6
  "Akokko <admin@akokko.com>"
7
7
  ],
package/readme.md CHANGED
@@ -137,6 +137,7 @@
137
137
  - ver 1.2.3-rc.10 修复不能移除边框的bug,对图片布局进行了调整,新增下播消息发送主播头像
138
138
  - ver 1.2.3-rc.11 测试版本,请跳过
139
139
  - ver 1.2.3 完善主播下播消息发送头像功能,优化控制台订阅信息显示
140
+ - ver 1.2.4 优化了下播消息发送头像图片的质量和插件重启提示
140
141
 
141
142
  ## 交流群
142
143