koishi-plugin-bilibili-notify 2.0.0-alpha.19 → 2.0.0-alpha.20
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/comRegister.js +4 -5
- package/package.json +1 -1
- package/readme.md +1 -0
package/lib/comRegister.js
CHANGED
|
@@ -1082,13 +1082,12 @@ class ComRegister {
|
|
|
1082
1082
|
// 推送直播信息
|
|
1083
1083
|
// pic 存在,使用的是render模式
|
|
1084
1084
|
if (pic) {
|
|
1085
|
-
const msg = liveNotifyMsg || '';
|
|
1086
1085
|
// 只有在开播时才艾特全体成员
|
|
1087
1086
|
if (liveType === LiveType.StartBroadcasting) {
|
|
1088
|
-
return await this.sendMsg(ctx, target, pic +
|
|
1087
|
+
return await this.sendMsg(ctx, target, pic + (liveNotifyMsg ?? ''), true);
|
|
1089
1088
|
}
|
|
1090
1089
|
// 正常不需要艾特全体成员
|
|
1091
|
-
return await this.sendMsg(ctx, target, pic +
|
|
1090
|
+
return await this.sendMsg(ctx, target, pic + (liveNotifyMsg ?? ''));
|
|
1092
1091
|
}
|
|
1093
1092
|
// pic不存在,说明使用的是page模式
|
|
1094
1093
|
const msg = (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [koishi_1.h.image(buffer, 'image/png'), liveNotifyMsg || ''] });
|
|
@@ -1169,7 +1168,7 @@ class ComRegister {
|
|
|
1169
1168
|
const liveMsg = this.config.customLive ? this.config.customLive
|
|
1170
1169
|
.replace('-name', username)
|
|
1171
1170
|
.replace('-time', await ctx.gi.getTimeDifference(liveTime))
|
|
1172
|
-
.replace('-link', `https://live.bilibili.com/${data.short_id === 0 ? data.room_id : data.short_id}`) :
|
|
1171
|
+
.replace('-link', `https://live.bilibili.com/${data.short_id === 0 ? data.room_id : data.short_id}`) : null;
|
|
1173
1172
|
// 发送直播通知卡片
|
|
1174
1173
|
if (this.config.restartPush)
|
|
1175
1174
|
sendLiveNotifyCard(data, LiveType.LiveBroadcast, liveMsg);
|
|
@@ -1242,7 +1241,7 @@ class ComRegister {
|
|
|
1242
1241
|
const liveMsg = this.config.customLive ? this.config.customLive
|
|
1243
1242
|
.replace('-name', username)
|
|
1244
1243
|
.replace('-time', await ctx.gi.getTimeDifference(liveTime))
|
|
1245
|
-
.replace('-link', `https://live.bilibili.com/${data.short_id === 0 ? data.room_id : data.short_id}`) :
|
|
1244
|
+
.replace('-link', `https://live.bilibili.com/${data.short_id === 0 ? data.room_id : data.short_id}`) : null;
|
|
1246
1245
|
// 发送直播通知卡片
|
|
1247
1246
|
sendLiveNotifyCard(data, LiveType.LiveBroadcast, liveMsg);
|
|
1248
1247
|
}
|
package/package.json
CHANGED
package/readme.md
CHANGED