koishi-plugin-bilibili-notify 2.0.0-alpha.3 → 2.0.0-alpha.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/{readme.md → README.md} +1 -0
- package/lib/comRegister.js +7 -3
- package/package.json +1 -1
package/{readme.md → README.md}
RENAMED
|
@@ -181,6 +181,7 @@
|
|
|
181
181
|
- ver 2.0.0-alpha.1 修复:无法成功取消订阅自己、用户没有直播间订阅直播出错。对直播订阅进行了限制,继承自以前的unlockSubLimits配置项。优化了一些配置项
|
|
182
182
|
- ver 2.0.0-alpha.2 新增:支持Discord平台。优化了下播通知
|
|
183
183
|
- ver 2.0.0-alpha.3 修复:订阅和取消订阅的bug,下播通知的bug
|
|
184
|
+
- ver 2.0.0-alpha.4 修复:初次订阅后不推送动态的bug 优化:下播不再发送链接
|
|
184
185
|
|
|
185
186
|
## 交流群
|
|
186
187
|
|
package/lib/comRegister.js
CHANGED
|
@@ -103,7 +103,7 @@ class ComRegister {
|
|
|
103
103
|
.usage('查看订阅管理对象')
|
|
104
104
|
.example('status sm')
|
|
105
105
|
.action(async () => {
|
|
106
|
-
|
|
106
|
+
this.logger.info(this.subManager);
|
|
107
107
|
return '查看控制台';
|
|
108
108
|
});
|
|
109
109
|
const biliCom = ctx.command('bili', 'bili-notify插件相关指令', { permissions: ['authority:3'] });
|
|
@@ -303,7 +303,11 @@ class ComRegister {
|
|
|
303
303
|
// 检查必选参数是否已填
|
|
304
304
|
if (!mid)
|
|
305
305
|
return '请输入用户uid';
|
|
306
|
-
// 订阅对象
|
|
306
|
+
// 订阅对象
|
|
307
|
+
const subUserData = await this.subUserInBili(ctx, mid);
|
|
308
|
+
// 判断是否订阅对象存在
|
|
309
|
+
if (!subUserData.flag)
|
|
310
|
+
return '订阅对象失败,请稍后重试!';
|
|
307
311
|
// 定义外围变量
|
|
308
312
|
let content;
|
|
309
313
|
try {
|
|
@@ -1045,7 +1049,7 @@ class ComRegister {
|
|
|
1045
1049
|
// 推送直播信息
|
|
1046
1050
|
// pic 存在,使用的是render模式
|
|
1047
1051
|
if (pic) {
|
|
1048
|
-
const msg = (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [atAll && (0, jsx_runtime_1.jsx)("at", { type: "all" }), liveStartMsg && liveStartMsg, liveType !== LiveType.StartBroadcasting ? `https://live.bilibili.com/${roomId}` : ''] });
|
|
1052
|
+
const msg = (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [atAll && (0, jsx_runtime_1.jsx)("at", { type: "all" }), liveStartMsg && liveStartMsg, liveType !== LiveType.StartBroadcasting && liveType !== LiveType.StopBroadcast ? `https://live.bilibili.com/${roomId}` : ''] });
|
|
1049
1053
|
return await this.sendMsg(guildId, pic + msg);
|
|
1050
1054
|
}
|
|
1051
1055
|
// pic不存在,说明使用的是page模式
|