yz-yuki-plugin 2.0.7-16 → 2.0.7-17

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.
@@ -412,7 +412,11 @@ class BiliQuery {
412
412
  `\n投稿:${author ? moment(author.pub_ts * 1000).format('YYYY年MM月DD日 HH:mm:ss') : ''}`,
413
413
  `\n--------------------`,
414
414
  `\n${desc?.stat?.danmaku}弹幕 • ${desc?.stat?.play}播放`,
415
- `\n${formatNumber(module_stat?.like?.count)}点赞 • ${formatNumber(module_stat?.comment?.count)}评论 • ${formatNumber(module_stat?.forward?.count)}转发`,
415
+ ...(module_stat
416
+ ? [
417
+ `\n${formatNumber(module_stat.like?.count)}点赞 • ${formatNumber(module_stat.comment?.count)}评论 • ${formatNumber(module_stat.forward?.count)}转发`
418
+ ]
419
+ : []),
416
420
  `\n--------------------`,
417
421
  `\n链接:${this.formatUrl(desc.jump_url)}`
418
422
  ];
@@ -449,9 +453,12 @@ class BiliQuery {
449
453
  `\n--------------------`,
450
454
  `\n投稿:${author ? moment(author.pub_ts * 1000).format('YYYY年MM月DD日 HH:mm:ss') : ''}`,
451
455
  `\n--------------------`,
452
- `\n${formatNumber(module_stat?.like?.count)}点赞 • ${formatNumber(module_stat?.comment?.count)}评论 • ${formatNumber(module_stat?.forward?.count)}转发`,
453
- `\n--------------------`,
454
- `\n链接:${BiliDrawDynamicLinkUrl}${data.id_str}\n`
456
+ ...(module_stat
457
+ ? [
458
+ `\n${formatNumber(module_stat.like?.count)}点赞 • ${formatNumber(module_stat.comment?.count)}评论 • ${formatNumber(module_stat.forward?.count)}转发\n--------------------`
459
+ ]
460
+ : []),
461
+ `\n链接:${BiliDrawDynamicLinkUrl}${data.id_str}`
455
462
  ];
456
463
  return { msg, pics, dynamicType };
457
464
  case 'DYNAMIC_TYPE_DRAW':
@@ -501,8 +508,11 @@ class BiliQuery {
501
508
  `\n--------------------`,
502
509
  `\n投稿:${author ? moment(author.pub_ts * 1000).format('YYYY年MM月DD日 HH:mm:ss') : ''}`,
503
510
  `\n--------------------`,
504
- `\n${formatNumber(module_stat?.like?.count)}点赞 • ${formatNumber(module_stat?.comment?.count)}评论 • ${formatNumber(module_stat?.forward?.count)}转发`,
505
- `\n--------------------`,
511
+ ...(module_stat
512
+ ? [
513
+ `\n${formatNumber(module_stat.like?.count)}点赞 • ${formatNumber(module_stat.comment?.count)}评论 • ${formatNumber(module_stat.forward?.count)}转发\n--------------------`
514
+ ]
515
+ : []),
506
516
  `\n链接:${BiliDrawDynamicLinkUrl}${data.id_str}`
507
517
  ];
508
518
  return { msg, pics, dynamicType };
@@ -552,8 +562,11 @@ class BiliQuery {
552
562
  `\n--------------------`,
553
563
  `\n投稿:${author ? moment(author.pub_ts * 1000).format('YYYY年MM月DD日 HH:mm:ss') : ''}`,
554
564
  `\n--------------------`,
555
- `\n${formatNumber(module_stat?.like?.count)}点赞 • ${formatNumber(module_stat?.comment?.count)}评论 • ${formatNumber(module_stat?.forward?.count)}转发`,
556
- `\n--------------------`,
565
+ ...(module_stat
566
+ ? [
567
+ `\n${formatNumber(module_stat.like?.count)}点赞 • ${formatNumber(module_stat.comment?.count)}评论 • ${formatNumber(module_stat.forward?.count)}转发\n--------------------`
568
+ ]
569
+ : []),
557
570
  `\n链接:${this.formatUrl(desc.jump_url)}`
558
571
  ];
559
572
  return { msg, pics, dynamicType };
@@ -586,8 +599,11 @@ class BiliQuery {
586
599
  `\n--------------------`,
587
600
  `\n投稿:${author ? moment(author.pub_ts * 1000).format('YYYY年MM月DD日 HH:mm:ss') : ''}`,
588
601
  `\n--------------------`,
589
- `\n${formatNumber(module_stat?.like?.count)}点赞 • ${formatNumber(module_stat?.comment?.count)}评论 • ${formatNumber(module_stat?.forward?.count)}转发`,
590
- `\n--------------------`,
602
+ ...(module_stat
603
+ ? [
604
+ `\n${formatNumber(module_stat.like?.count)}点赞 • ${formatNumber(module_stat.comment?.count)}评论 • ${formatNumber(module_stat.forward?.count)}转发\n--------------------`
605
+ ]
606
+ : []),
591
607
  `\n链接:${BiliDrawDynamicLinkUrl}${data.id_str}\n`,
592
608
  '\n>>>>以下为转发内容<<<<\n',
593
609
  ...origContent
@@ -239,8 +239,11 @@ class WeiboQuery {
239
239
  `\n--------------------`,
240
240
  `\n投稿:${created_time ? moment(created_time).format('YYYY年MM月DD日 HH:mm:ss') : ''}`,
241
241
  `\n--------------------`,
242
- `\n${formatNumber(info?.attitudes_count)}点赞 • ${formatNumber(info?.comments_count)}评论 ${formatNumber(info?.reposts_count)}转发 `,
243
- `\n--------------------`,
242
+ ...(info?.comments_count != null
243
+ ? [
244
+ `\n${formatNumber(info?.attitudes_count)}点赞 • ${formatNumber(info?.comments_count)}评论 • ${formatNumber(info?.reposts_count)}转发\n--------------------`
245
+ ]
246
+ : []),
244
247
  `\n链接:${detail_url}`
245
248
  ];
246
249
  return { msg, pics, dynamicType };
@@ -264,8 +267,11 @@ class WeiboQuery {
264
267
  `\n--------------------`,
265
268
  `\n投稿:${created_time ? moment(created_time).format('YYYY年MM月DD日 HH:mm:ss') : ''}`,
266
269
  `\n--------------------`,
267
- `\n${formatNumber(info?.attitudes_count)}点赞 • ${formatNumber(info?.comments_count)}评论 ${formatNumber(info?.reposts_count)}转发 `,
268
- `\n--------------------`,
270
+ ...(info?.comments_count != null
271
+ ? [
272
+ `\n${formatNumber(info?.attitudes_count)}点赞 • ${formatNumber(info?.comments_count)}评论 • ${formatNumber(info?.reposts_count)}转发\n--------------------`
273
+ ]
274
+ : []),
269
275
  `\n链接:${detail_url}`
270
276
  ];
271
277
  return { msg, pics, dynamicType };
@@ -289,8 +295,11 @@ class WeiboQuery {
289
295
  `\n--------------------`,
290
296
  `\n投稿:${created_time ? moment(created_time).format('YYYY年MM月DD日 HH:mm:ss') : ''}`,
291
297
  `\n--------------------`,
292
- `\n${formatNumber(info?.attitudes_count)}点赞 • ${formatNumber(info?.comments_count)}评论 ${formatNumber(info?.reposts_count)}转发 `,
293
- `\n--------------------`,
298
+ ...(info?.comments_count != null
299
+ ? [
300
+ `\n${formatNumber(info?.attitudes_count)}点赞 • ${formatNumber(info?.comments_count)}评论 • ${formatNumber(info?.reposts_count)}转发\n--------------------`
301
+ ]
302
+ : []),
294
303
  `\n链接:${detail_url}`
295
304
  ];
296
305
  return { msg, pics, dynamicType };
@@ -319,8 +328,11 @@ class WeiboQuery {
319
328
  `\n--------------------`,
320
329
  `\n投稿:${created_time ? moment(created_time).format('YYYY年MM月DD日 HH:mm:ss') : ''}`,
321
330
  `\n--------------------`,
322
- `\n${formatNumber(info?.attitudes_count)}点赞 • ${formatNumber(info?.comments_count)}评论 ${formatNumber(info?.reposts_count)}转发 `,
323
- `\n--------------------`,
331
+ ...(info?.comments_count != null
332
+ ? [
333
+ `\n${formatNumber(info?.attitudes_count)}点赞 • ${formatNumber(info?.comments_count)}评论 • ${formatNumber(info?.reposts_count)}转发\n--------------------`
334
+ ]
335
+ : []),
324
336
  `\n链接:${detail_url}\n`,
325
337
  '\n>>>>以下为转发内容<<<<\n',
326
338
  ...origContent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yz-yuki-plugin",
3
- "version": "2.0.7-16",
3
+ "version": "2.0.7-17",
4
4
  "description": "优纪插件,yunzaijs 关于 微博推送、B站推送 等功能的拓展插件",
5
5
  "author": "snowtafir",
6
6
  "type": "module",