koishi-plugin-bilibili-notify 3.1.7-alpha.2 → 3.1.7
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 -2
- package/lib/generateImg.js +2 -2
- package/package.json +1 -1
- package/readme.md +3 -1
package/lib/comRegister.js
CHANGED
|
@@ -1185,8 +1185,7 @@ class ComRegister {
|
|
|
1185
1185
|
// 获取关注分组信息
|
|
1186
1186
|
const checkGroupIsReady = async () => {
|
|
1187
1187
|
// 判断是否有数据
|
|
1188
|
-
if (this.loginDBData
|
|
1189
|
-
this.loginDBData.dynamic_group_id === null) {
|
|
1188
|
+
if (!this.loginDBData?.dynamic_group_id) {
|
|
1190
1189
|
// 没有数据,没有创建分组,尝试创建分组
|
|
1191
1190
|
const createGroupData = await this.ctx.ba.createGroup("订阅");
|
|
1192
1191
|
// 如果分组已创建,则获取分组id
|
package/lib/generateImg.js
CHANGED
|
@@ -247,7 +247,7 @@ class GenerateImg extends koishi_1.Service {
|
|
|
247
247
|
// 最基本的图文处理
|
|
248
248
|
const basicDynamic = () => {
|
|
249
249
|
const module_dynamic = dynamic.modules.module_dynamic;
|
|
250
|
-
if (module_dynamic
|
|
250
|
+
if (module_dynamic?.major?.opus?.summary) {
|
|
251
251
|
const richText = module_dynamic.major.opus.summary.rich_text_nodes.reduce((accumulator, currentValue) => {
|
|
252
252
|
if (currentValue.emoji) {
|
|
253
253
|
return /* html */ `${accumulator}<img style="width:28px; height:28px;" src="${currentValue.emoji.icon_url}"/>`;
|
|
@@ -283,7 +283,7 @@ class GenerateImg extends koishi_1.Service {
|
|
|
283
283
|
// 图片
|
|
284
284
|
let major = "";
|
|
285
285
|
const arrowImg = (0, node_url_1.pathToFileURL)((0, node_path_1.resolve)(__dirname, "img/arrow.png"));
|
|
286
|
-
if (module_dynamic
|
|
286
|
+
if (module_dynamic?.major?.opus?.pics) {
|
|
287
287
|
if (module_dynamic.major.opus.pics.length === 1) {
|
|
288
288
|
const height = module_dynamic.major.opus.pics[0].height;
|
|
289
289
|
if (height > 3000) {
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -245,7 +245,9 @@ uid为必填参数,为要推送的UP主的UID,index为可选参数,为要
|
|
|
245
245
|
- ver 3.1.6 修复:视频类动态推送时,发送的视频链接有误;
|
|
246
246
|
- ver 3.1.7-alpha.0 修复:登录账号和订阅账号是同一个账号,动态不会推送,使用 `bili dyn` 指令,纯文本动态会被跳过; 新增:动态标题;
|
|
247
247
|
- ver 3.1.7-alpha.1 修复:启用自定义卡片样式后取消仍是自定义样式;
|
|
248
|
-
- ver 3.1.7-alpha.2 修复:`liveDetect generateLiveImg() 推送卡片生成失败,原因:Cannot read properties of undefined (reading 'cardColorStart')
|
|
248
|
+
- ver 3.1.7-alpha.2 修复:`liveDetect generateLiveImg() 推送卡片生成失败,原因:Cannot read properties of undefined (reading 'cardColorStart')`;
|
|
249
|
+
- ver 3.1.7-alpha.3 修复:推送视频类动态报错;
|
|
250
|
+
- ver 3.1.7 修复:第一次使用插件报错 `TypeError: Cannot read properties of undefined (reading 'dynamic_group_id')`
|
|
249
251
|
|
|
250
252
|
## 交流群
|
|
251
253
|
|