koishi-plugin-bilitester 1.6.4 → 1.7.0
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/index.js +6 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -440,6 +440,9 @@ function apply(ctx, config) {
|
|
|
440
440
|
const video = videoInfo.data;
|
|
441
441
|
const duration = formatDuration(video.duration);
|
|
442
442
|
const pubdate = new Date(video.pubdate * 1000).toLocaleString('zh-CN');
|
|
443
|
+
if (!video.owner) {
|
|
444
|
+
return '获取视频信息失败,请稍后重试';
|
|
445
|
+
}
|
|
443
446
|
return `视频信息:\n` +
|
|
444
447
|
`标题: ${video.title}\n` +
|
|
445
448
|
`BV号: ${video.bvid}\n` +
|
|
@@ -504,6 +507,9 @@ function apply(ctx, config) {
|
|
|
504
507
|
const video = videoInfo.data;
|
|
505
508
|
const duration = formatDuration(video.duration);
|
|
506
509
|
const pubdate = new Date(video.pubdate * 1000).toLocaleString('zh-CN');
|
|
510
|
+
if (!video.owner) {
|
|
511
|
+
return '获取视频信息失败,请稍后重试';
|
|
512
|
+
}
|
|
507
513
|
return `视频信息:\n` +
|
|
508
514
|
`标题: ${video.title}\n` +
|
|
509
515
|
`BV号: ${video.bvid}\n` +
|