koishi-plugin-bilibili-notify 3.1.7-alpha.0 → 3.1.7-alpha.2
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 +1 -1
- package/lib/generateImg.d.ts +1 -1
- package/lib/generateImg.js +1 -1
- package/package.json +1 -1
- package/readme.md +2 -0
package/lib/comRegister.js
CHANGED
|
@@ -926,7 +926,7 @@ class ComRegister {
|
|
|
926
926
|
// 生成图片
|
|
927
927
|
const buffer = await (0, utils_1.withRetry)(async () => {
|
|
928
928
|
// 获取直播通知卡片
|
|
929
|
-
return await this.ctx.gi.generateLiveImg(liveRoomInfo, masterInfo.username, masterInfo.userface, followerDisplay, liveType, cardStyle);
|
|
929
|
+
return await this.ctx.gi.generateLiveImg(liveRoomInfo, masterInfo.username, masterInfo.userface, followerDisplay, liveType, cardStyle.enable ? cardStyle : undefined);
|
|
930
930
|
}, 1).catch((e) => {
|
|
931
931
|
this.logger.error(`liveDetect generateLiveImg() 推送卡片生成失败,原因:${e.message}`);
|
|
932
932
|
});
|
package/lib/generateImg.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ declare class GenerateImg extends Service {
|
|
|
10
10
|
giConfig: GenerateImg.Config;
|
|
11
11
|
constructor(ctx: Context, config: GenerateImg.Config);
|
|
12
12
|
imgHandler(html: string): Promise<Buffer<ArrayBufferLike>>;
|
|
13
|
-
generateLiveImg(data: any, username: string, userface: string, followerDisplay: string, liveStatus: number, { cardColorStart, cardColorEnd, cardBasePlateColor, cardBasePlateBorder, }
|
|
13
|
+
generateLiveImg(data: any, username: string, userface: string, followerDisplay: string, liveStatus: number, { cardColorStart, cardColorEnd, cardBasePlateColor, cardBasePlateBorder, }?: {
|
|
14
14
|
cardColorStart?: string;
|
|
15
15
|
cardColorEnd?: string;
|
|
16
16
|
cardBasePlateColor?: string;
|
package/lib/generateImg.js
CHANGED
|
@@ -51,7 +51,7 @@ class GenerateImg extends koishi_1.Service {
|
|
|
51
51
|
}
|
|
52
52
|
async generateLiveImg(
|
|
53
53
|
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
|
|
54
|
-
data, username, userface, followerDisplay, liveStatus /*0未开播 1刚开播 2已开播 3停止直播*/, { cardColorStart = this.giConfig.cardColorStart, cardColorEnd = this.giConfig.cardColorEnd, cardBasePlateColor = this.giConfig.cardBasePlateColor, cardBasePlateBorder = this.giConfig.cardBasePlateBorder, }) {
|
|
54
|
+
data, username, userface, followerDisplay, liveStatus /*0未开播 1刚开播 2已开播 3停止直播*/, { cardColorStart = this.giConfig.cardColorStart, cardColorEnd = this.giConfig.cardColorEnd, cardBasePlateColor = this.giConfig.cardBasePlateColor, cardBasePlateBorder = this.giConfig.cardBasePlateBorder, } = {}) {
|
|
55
55
|
const [titleStatus, liveTime, cover] = await this.getLiveStatus(data.live_time, liveStatus);
|
|
56
56
|
// 加载字体
|
|
57
57
|
const fontURL = (0, node_url_1.pathToFileURL)((0, node_path_1.resolve)(__dirname, "font/HYZhengYuan-75W.ttf"));
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -244,6 +244,8 @@ uid为必填参数,为要推送的UP主的UID,index为可选参数,为要
|
|
|
244
244
|
- ver 3.1.5 修复:非 `debug` 模式下动态推送,如果在一个监测周期内同一个订阅的up主发送多条动态,下一个监测周期会重复推送;
|
|
245
245
|
- ver 3.1.6 修复:视频类动态推送时,发送的视频链接有误;
|
|
246
246
|
- ver 3.1.7-alpha.0 修复:登录账号和订阅账号是同一个账号,动态不会推送,使用 `bili dyn` 指令,纯文本动态会被跳过; 新增:动态标题;
|
|
247
|
+
- ver 3.1.7-alpha.1 修复:启用自定义卡片样式后取消仍是自定义样式;
|
|
248
|
+
- ver 3.1.7-alpha.2 修复:`liveDetect generateLiveImg() 推送卡片生成失败,原因:Cannot read properties of undefined (reading 'cardColorStart')`
|
|
247
249
|
|
|
248
250
|
## 交流群
|
|
249
251
|
|