kokkoro-plugin-kfc 1.0.0 → 1.0.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 kokkorojs
3
+ Copyright (c) 2022 yuki
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -16,11 +16,11 @@ npm i kokkoro-plugin-kfc
16
16
 
17
17
  ## 环境变量
18
18
 
19
- 你可以在项目根目录下创建 `.env` 文件,修改 `KFC_DATE` 变量来自定义自动发送的时间,默认 `0 0 12 ? * 5`(每周四中午十二点)
19
+ 你可以在项目根目录下创建 `.env` 文件,修改 `KFC_DATE` 变量来自定义自动发送的时间,默认 `0 0 12 * * 4`(每周四中午十二点)
20
20
 
21
21
  ```ini
22
22
  # KFC 时间
23
- KFC_DATE=0 0 12 ? * 5
23
+ KFC_DATE=0 0 12 * * 4
24
24
  ```
25
25
 
26
26
  因为插件的定时任务是在初始化时创建的,所以如果你修改了 `KFC_DATE` 变量,需要使用 `reload` 指令将其重新挂载才能生效。
package/lib/index.js CHANGED
@@ -12,7 +12,7 @@ const plugin = new core_1.Plugin('kfc', option);
12
12
  const service = new service_1.Service(plugin);
13
13
  plugin
14
14
  .version(pkg.version)
15
- .schedule(process.env.KFC_DATE ?? '0 0 12 ? * 5', async () => {
15
+ .schedule(process.env.KFC_DATE ?? '0 0 12 * * 4', async () => {
16
16
  await service.autoSend();
17
17
  });
18
18
  plugin
package/lib/service.js CHANGED
@@ -36,7 +36,7 @@ class Service {
36
36
  const uin = uins[i];
37
37
  const info = bot.gl.get(uin);
38
38
  const { group_id } = info;
39
- const { apply, auto_send } = bot.profile.getOption(group_id, 'message');
39
+ const { apply, auto_send } = bot.profile.getOption(group_id, 'kfc');
40
40
  if (apply && auto_send) {
41
41
  sendQueue.push(bot.sendGroupMsg(group_id, message));
42
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kokkoro-plugin-kfc",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "肯德基疯狂星期四段子",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -27,4 +27,4 @@
27
27
  "files": [
28
28
  "lib"
29
29
  ]
30
- }
30
+ }