yz-yuki-plugin 2.0.7-21 → 2.0.7-23
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.
|
@@ -32,13 +32,13 @@ getDataRandomDelay: 8000
|
|
|
32
32
|
pushTransmit: 1
|
|
33
33
|
|
|
34
34
|
# 推送文字和图文动态时,限制发送多少张图片
|
|
35
|
-
pushPicCountLimit:
|
|
35
|
+
pushPicCountLimit: 9
|
|
36
36
|
|
|
37
37
|
# 推送文字和图文动态时,限制字数是多少
|
|
38
|
-
pushContentLenLimit:
|
|
38
|
+
pushContentLenLimit: 1000
|
|
39
39
|
|
|
40
40
|
# 推送文字和图文动态时,限制多少行文本
|
|
41
|
-
pushContentLineLimit:
|
|
41
|
+
pushContentLineLimit: 100
|
|
42
42
|
|
|
43
43
|
# 是否展示定时任务的日志,0 不显示 1 显示
|
|
44
44
|
pushTaskLog: 1
|
|
@@ -27,13 +27,13 @@ dynamicTimeRange: 7200
|
|
|
27
27
|
pushTransmit: 1
|
|
28
28
|
|
|
29
29
|
# 推送动态时,限制发送多少张图片
|
|
30
|
-
pushPicCountLimit:
|
|
30
|
+
pushPicCountLimit: 9
|
|
31
31
|
|
|
32
32
|
# 推送文字和图文动态时,限制字数是多少
|
|
33
|
-
pushContentLenLimit:
|
|
33
|
+
pushContentLenLimit: 1000
|
|
34
34
|
|
|
35
35
|
# 推送文字和图文动态时,限制多少行文本
|
|
36
|
-
pushContentLineLimit:
|
|
36
|
+
pushContentLineLimit: 100
|
|
37
37
|
|
|
38
38
|
# 是否展示定时任务的日志,0 不显示 1 显示
|
|
39
39
|
pushTaskLog: 1
|
|
@@ -148,6 +148,9 @@ async function checkBiliLogin(e) {
|
|
|
148
148
|
const LoginCookieTTLStr = LoginCookieTTL === -1 ? '永久' : LoginCookieTTL === -2 ? '-' : `${new Date(Date.now() + LoginCookieTTL * 1000).toLocaleString()}`;
|
|
149
149
|
e.reply(`~B站账号已登陆~\n有效期至:${LoginCookieTTLStr}。\n昵称:${uname}\nuid:${mid}\n硬币:${money}\n经验等级:${current_level}\n当前经验值exp:${current_exp}\n下一等级所需exp:${next_exp}`);
|
|
150
150
|
}
|
|
151
|
+
else if (resData.code === -101) {
|
|
152
|
+
e.reply('B站登录CK已失效,请重新扫码登录');
|
|
153
|
+
}
|
|
151
154
|
else {
|
|
152
155
|
// 处理其他情况
|
|
153
156
|
e.reply('意外情况,未能成功获取登录ck的有效状态');
|
|
@@ -492,7 +492,7 @@ class BiliQuery {
|
|
|
492
492
|
if (!desc && !pics && !author)
|
|
493
493
|
return;
|
|
494
494
|
module_stat = data?.modules?.module_stat;
|
|
495
|
-
const dynamicPicCountLimit = setData.pushPicCountLimit ||
|
|
495
|
+
const dynamicPicCountLimit = setData.pushPicCountLimit || 9;
|
|
496
496
|
if (pics.length > dynamicPicCountLimit) {
|
|
497
497
|
pics.length = dynamicPicCountLimit;
|
|
498
498
|
}
|
|
@@ -640,9 +640,9 @@ class BiliQuery {
|
|
|
640
640
|
}
|
|
641
641
|
// 限制文字模式下动态内容的字数和行数
|
|
642
642
|
static dynamicContentLimit(content, setData) {
|
|
643
|
-
const lines = content.split('\n');
|
|
644
|
-
const lengthLimit = setData.pushContentLenLimit ||
|
|
645
|
-
const lineLimit = setData.pushContentLineLimit ||
|
|
643
|
+
const lines = String(content).split('\n');
|
|
644
|
+
const lengthLimit = setData.pushContentLenLimit || 1000;
|
|
645
|
+
const lineLimit = setData.pushContentLineLimit || 100;
|
|
646
646
|
// 限制行数
|
|
647
647
|
if (lines.length > lineLimit) {
|
|
648
648
|
lines.length = lineLimit;
|
|
@@ -211,7 +211,7 @@ class WeiboQuery {
|
|
|
211
211
|
let created_time = this.getDynamicCreatetDate(raw_post);
|
|
212
212
|
let detail_url = `https://weibo.com/${info?.user?.id}/${info?.bid}`;
|
|
213
213
|
let msg_meta = `微博【${upName}】动态推送:`;
|
|
214
|
-
const dynamicPicCountLimit = setData.pushPicCountLimit ||
|
|
214
|
+
const dynamicPicCountLimit = setData.pushPicCountLimit || 9;
|
|
215
215
|
function formatNumber(num) {
|
|
216
216
|
if (num >= 10000) {
|
|
217
217
|
return `${(num / 10000).toFixed(1)}万`;
|
|
@@ -345,9 +345,9 @@ class WeiboQuery {
|
|
|
345
345
|
}
|
|
346
346
|
// 限制文字模式下动态内容的字数和行数
|
|
347
347
|
static dynamicContentLimit(content, setData) {
|
|
348
|
-
const lines = content.split('\n');
|
|
349
|
-
const lengthLimit = setData.pushContentLenLimit ||
|
|
350
|
-
const lineLimit = setData.pushContentLineLimit ||
|
|
348
|
+
const lines = String(content).split('\n');
|
|
349
|
+
const lengthLimit = setData.pushContentLenLimit || 1000;
|
|
350
|
+
const lineLimit = setData.pushContentLineLimit || 100;
|
|
351
351
|
// 限制行数
|
|
352
352
|
if (lines.length > lineLimit) {
|
|
353
353
|
lines.length = lineLimit;
|