koishi-plugin-bilibili-notify 1.0.4-alpha.1 → 1.0.4-alpha.2
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 +8 -9
- package/package.json +1 -1
package/lib/comRegister.js
CHANGED
|
@@ -57,9 +57,8 @@ class ComRegister {
|
|
|
57
57
|
.subcommand('.time')
|
|
58
58
|
.usage('测试时间接口')
|
|
59
59
|
.example('test.time')
|
|
60
|
-
.action(async () => {
|
|
61
|
-
|
|
62
|
-
return content;
|
|
60
|
+
.action(async ({ session }) => {
|
|
61
|
+
session.send(await ctx.biliAPI.getTimeNow());
|
|
63
62
|
});
|
|
64
63
|
ctx.command('test')
|
|
65
64
|
.subcommand('.exist')
|
|
@@ -500,10 +499,10 @@ class ComRegister {
|
|
|
500
499
|
let timer = 0;
|
|
501
500
|
return async () => {
|
|
502
501
|
// Test code
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
502
|
+
this.logger.info('timer:' + timer++);
|
|
503
|
+
this.logger.info('firstSubscription:' + firstSubscription);
|
|
504
|
+
this.logger.info(`timePoint: ${timePoint}`);
|
|
505
|
+
this.logger.info(`timePoint: ${ctx.gimg.unixTimestampToString(timePoint)}`);
|
|
507
506
|
// 第一次订阅判断
|
|
508
507
|
if (firstSubscription) {
|
|
509
508
|
// 设置第一次的时间点
|
|
@@ -542,8 +541,8 @@ class ComRegister {
|
|
|
542
541
|
if (!items[num])
|
|
543
542
|
continue;
|
|
544
543
|
// Test code
|
|
545
|
-
|
|
546
|
-
|
|
544
|
+
this.logger.info(`items[${num}].modules.module_author.pub_ts: ${items[num].modules.module_author.pub_ts}`);
|
|
545
|
+
this.logger.info(`items[${num}].modules.module_author.pub_ts: ${ctx.gimg.unixTimestampToString(items[num].modules.module_author.pub_ts)}`);
|
|
547
546
|
// 寻找发布时间比时间点时间更晚的动态
|
|
548
547
|
if (items[num].modules.module_author.pub_ts > timePoint) {
|
|
549
548
|
// 如果这是遍历的最后一条,将时间点设置为这条动态的发布时间
|