koishi-plugin-bilibili-notify 1.0.4-alpha.0 → 1.0.4-alpha.1

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.
@@ -59,7 +59,7 @@ class ComRegister {
59
59
  .example('test.time')
60
60
  .action(async () => {
61
61
  const content = await ctx.biliAPI.getTimeNow();
62
- console.log(content);
62
+ return content;
63
63
  });
64
64
  ctx.command('test')
65
65
  .subcommand('.exist')
@@ -102,8 +102,8 @@ class ComRegister {
102
102
  .subcommand('.utc')
103
103
  .usage('获取当前UTC+8 Unix时间戳')
104
104
  .example('test utc')
105
- .action(async () => {
106
- console.log(await ctx.biliAPI.getServerUTCTime());
105
+ .action(async ({ session }) => {
106
+ session.send((await ctx.biliAPI.getServerUTCTime()).toString());
107
107
  });
108
108
  ctx.command('bili', 'bili-notify插件相关指令', { permissions: ['authority:3'] })
109
109
  .subcommand('.login', '登录B站之后才可以进行之后的操作')
@@ -497,13 +497,13 @@ class ComRegister {
497
497
  let firstSubscription = true;
498
498
  let timePoint;
499
499
  // Test code
500
- // let timer = 0
500
+ let timer = 0;
501
501
  return async () => {
502
502
  // Test code
503
- /* console.log('timer:' + timer++);
503
+ console.log('timer:' + timer++);
504
504
  console.log('firstSubscription:' + firstSubscription);
505
505
  console.log(`timePoint: ${timePoint}`);
506
- console.log(`timePoint: ${ctx.gimg.unixTimestampToString(timePoint)}`); */
506
+ console.log(`timePoint: ${ctx.gimg.unixTimestampToString(timePoint)}`);
507
507
  // 第一次订阅判断
508
508
  if (firstSubscription) {
509
509
  // 设置第一次的时间点
@@ -536,13 +536,14 @@ class ComRegister {
536
536
  }
537
537
  // 获取数据内容
538
538
  const items = content.data.items;
539
- // 发送请求 默认只查看前五条数据
539
+ // 发送请求 默认只查看配置文件规定的数据
540
540
  for (let num = this.config.dynamicCheckNumber - 1; num >= 0; num--) {
541
541
  // 没有动态内容则直接跳过
542
542
  if (!items[num])
543
543
  continue;
544
544
  // Test code
545
- // console.log(`items[${num}].modules.module_author.pub_ts: ${ctx.gimg.unixTimestampToString(items[num].modules.module_author.pub_ts)}`);
545
+ console.log(`items[${num}].modules.module_author.pub_ts: ${items[num].modules.module_author.pub_ts}`);
546
+ console.log(`items[${num}].modules.module_author.pub_ts: ${ctx.gimg.unixTimestampToString(items[num].modules.module_author.pub_ts)}`);
546
547
  // 寻找发布时间比时间点时间更晚的动态
547
548
  if (items[num].modules.module_author.pub_ts > timePoint) {
548
549
  // 如果这是遍历的最后一条,将时间点设置为这条动态的发布时间
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-bilibili-notify",
3
3
  "description": "Koishi bilibili notify plugin",
4
- "version": "1.0.4-alpha.0",
4
+ "version": "1.0.4-alpha.1",
5
5
  "contributors": [
6
6
  "Akokko <admin@akokko.com>"
7
7
  ],
package/readme.md CHANGED
@@ -1,6 +1,4 @@
1
- <center>
2
1
  # Bilibili-Botify
3
- </center>
4
2
 
5
3
  基于 [koishi](../../../../koishijs/koishi) 框架的B站推送插件
6
4