wechaty-web-panel 1.6.18 → 1.6.19
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.
|
@@ -10,6 +10,7 @@ const userDb_js_1 = require("../db/userDb.js");
|
|
|
10
10
|
const index_js_3 = require("../task/index.js");
|
|
11
11
|
const puppetDb_js_1 = require("../db/puppetDb.js");
|
|
12
12
|
const rss_js_1 = require("../task/rss.js");
|
|
13
|
+
const configDb_js_1 = require("../db/configDb.js");
|
|
13
14
|
/**
|
|
14
15
|
* 准备好的事件
|
|
15
16
|
*/
|
|
@@ -18,7 +19,11 @@ async function onReady() {
|
|
|
18
19
|
await (0, puppetDb_js_1.updatePuppetConfig)({ puppetType: this.puppet.constructor.name });
|
|
19
20
|
await (0, aibotk_js_1.getConfig)(); // 获取配置文件
|
|
20
21
|
(0, index_js_3.initAllSchedule)(this); // 初始化任务
|
|
21
|
-
(0,
|
|
22
|
+
const config = await (0, configDb_js_1.allConfig)();
|
|
23
|
+
const { role } = config.userInfo;
|
|
24
|
+
if (role === 'vip') {
|
|
25
|
+
(0, rss_js_1.initRssTask)(this); // 初始化rss 任务
|
|
26
|
+
}
|
|
22
27
|
await (0, userDb_js_1.getUser)();
|
|
23
28
|
console.log(`所有数据准备完毕`);
|
|
24
29
|
(0, aibotk_js_1.sendHeartBeat)('live');
|
|
@@ -5,6 +5,7 @@ import { getUser } from '../db/userDb.js';
|
|
|
5
5
|
import { initAllSchedule } from "../task/index.js";
|
|
6
6
|
import { updatePuppetConfig } from "../db/puppetDb.js";
|
|
7
7
|
import { initRssTask } from "../task/rss.js";
|
|
8
|
+
import { allConfig } from "../db/configDb.js";
|
|
8
9
|
/**
|
|
9
10
|
* 准备好的事件
|
|
10
11
|
*/
|
|
@@ -13,7 +14,11 @@ async function onReady() {
|
|
|
13
14
|
await updatePuppetConfig({ puppetType: this.puppet.constructor.name });
|
|
14
15
|
await getConfig(); // 获取配置文件
|
|
15
16
|
initAllSchedule(this); // 初始化任务
|
|
16
|
-
|
|
17
|
+
const config = await allConfig();
|
|
18
|
+
const { role } = config.userInfo;
|
|
19
|
+
if (role === 'vip') {
|
|
20
|
+
initRssTask(this); // 初始化rss 任务
|
|
21
|
+
}
|
|
17
22
|
await getUser();
|
|
18
23
|
console.log(`所有数据准备完毕`);
|
|
19
24
|
sendHeartBeat('live');
|