koishi-plugin-bilitester 1.4.0 → 1.5.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 +10 -11
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -290,8 +290,7 @@ function apply(ctx, config) {
|
|
|
290
290
|
console.error('轮询登录状态失败:', error);
|
|
291
291
|
}
|
|
292
292
|
};
|
|
293
|
-
|
|
294
|
-
cmd.subcommand('.login', '获取哔哩哔哩登录二维码')
|
|
293
|
+
ctx.command('.login', '获取哔哩哔哩登录二维码')
|
|
295
294
|
.action(async ({ session }) => {
|
|
296
295
|
if (!session) {
|
|
297
296
|
return '无法获取会话信息';
|
|
@@ -335,7 +334,7 @@ function apply(ctx, config) {
|
|
|
335
334
|
return '获取二维码失败,请稍后重试';
|
|
336
335
|
}
|
|
337
336
|
});
|
|
338
|
-
|
|
337
|
+
ctx.command('.logout', '退出哔哩哔哩登录')
|
|
339
338
|
.action(async ({ session }) => {
|
|
340
339
|
if (!session) {
|
|
341
340
|
return '无法获取会话信息';
|
|
@@ -350,7 +349,7 @@ function apply(ctx, config) {
|
|
|
350
349
|
return '退出登录失败,请稍后重试';
|
|
351
350
|
}
|
|
352
351
|
});
|
|
353
|
-
|
|
352
|
+
ctx.command('.info', '查看当前登录的哔哩哔哩账号信息')
|
|
354
353
|
.action(async ({ session }) => {
|
|
355
354
|
if (!session) {
|
|
356
355
|
return '无法获取会话信息';
|
|
@@ -378,7 +377,7 @@ function apply(ctx, config) {
|
|
|
378
377
|
return '获取账号信息失败,请稍后重试';
|
|
379
378
|
}
|
|
380
379
|
});
|
|
381
|
-
|
|
380
|
+
ctx.command('.refresh', '刷新账号信息')
|
|
382
381
|
.action(async ({ session }) => {
|
|
383
382
|
if (!session) {
|
|
384
383
|
return '无法获取会话信息';
|
|
@@ -417,7 +416,7 @@ function apply(ctx, config) {
|
|
|
417
416
|
return '刷新账号信息失败,请稍后重试';
|
|
418
417
|
}
|
|
419
418
|
});
|
|
420
|
-
|
|
419
|
+
ctx.command('.video <bvid>', '获取B站视频信息')
|
|
421
420
|
.action(async ({ session }, bvid) => {
|
|
422
421
|
if (!session) {
|
|
423
422
|
return '无法获取会话信息';
|
|
@@ -455,7 +454,7 @@ function apply(ctx, config) {
|
|
|
455
454
|
return '获取视频信息失败,请稍后重试';
|
|
456
455
|
}
|
|
457
456
|
});
|
|
458
|
-
|
|
457
|
+
ctx.command('.parse <link>', '解析B站视频链接')
|
|
459
458
|
.action(async ({ session }, link) => {
|
|
460
459
|
if (!session) {
|
|
461
460
|
return '无法获取会话信息';
|
|
@@ -519,7 +518,7 @@ function apply(ctx, config) {
|
|
|
519
518
|
return '解析视频链接失败,请稍后重试';
|
|
520
519
|
}
|
|
521
520
|
});
|
|
522
|
-
|
|
521
|
+
ctx.command('.dynamic', '获取哔哩哔哩动态')
|
|
523
522
|
.action(async ({ session }) => {
|
|
524
523
|
if (!session) {
|
|
525
524
|
return '无法获取会话信息';
|
|
@@ -570,7 +569,7 @@ function apply(ctx, config) {
|
|
|
570
569
|
return '获取动态失败,请稍后重试';
|
|
571
570
|
}
|
|
572
571
|
});
|
|
573
|
-
|
|
572
|
+
ctx.command('.live <roomId>', '获取B站直播间信息')
|
|
574
573
|
.action(async ({ session }, roomId) => {
|
|
575
574
|
if (!session) {
|
|
576
575
|
return '无法获取会话信息';
|
|
@@ -608,7 +607,7 @@ function apply(ctx, config) {
|
|
|
608
607
|
return '获取直播间信息失败,请稍后重试';
|
|
609
608
|
}
|
|
610
609
|
});
|
|
611
|
-
|
|
610
|
+
ctx.command('.search <keyword>', '搜索B站视频')
|
|
612
611
|
.action(async ({ session }, keyword) => {
|
|
613
612
|
if (!session) {
|
|
614
613
|
return '无法获取会话信息';
|
|
@@ -674,7 +673,7 @@ function apply(ctx, config) {
|
|
|
674
673
|
return '搜索视频失败,请稍后重试';
|
|
675
674
|
}
|
|
676
675
|
});
|
|
677
|
-
|
|
676
|
+
ctx.command('.select <index>', '选择搜索结果中的视频')
|
|
678
677
|
.action(async ({ session }, index) => {
|
|
679
678
|
if (!session) {
|
|
680
679
|
return '无法获取会话信息';
|