mirror of
https://github.com/shanmiteko/LotteryAutoScript.git
synced 2026-06-04 21:01:17 +08:00
- 根据是否在action来提示env.js缺失 - `修改PAT` 与 `GITHUB_REPOSITORY`说明 - 修改dyid去重方法 - 去掉几个监视的uid - 议题模板
53 lines
1.1 KiB
JavaScript
53 lines
1.1 KiB
JavaScript
const { tooltip } = require('./Base');
|
|
|
|
const default_script = {
|
|
author: '@shanmite',
|
|
UIDs: [
|
|
31252386,
|
|
35719643,
|
|
689277291
|
|
],
|
|
TAGs: [
|
|
'互动抽奖',
|
|
'抽奖',
|
|
'转发抽奖',
|
|
'动态抽奖',
|
|
]
|
|
};
|
|
|
|
/**
|
|
* 自己修改过的设置
|
|
*/
|
|
const my_config = (() => {
|
|
let _my_config = {}
|
|
if (process.env.LOCALLAUNCH) {
|
|
try {
|
|
const { UIDs, TAGs } = require('../my_config.json');
|
|
if (UIDs) _my_config.UIDs = UIDs;
|
|
if (TAGs) _my_config.TAGs = TAGs;
|
|
} catch (e) {
|
|
tooltip.log("[script]无自定义设置\n" + e);
|
|
}
|
|
} else {
|
|
try {
|
|
const { MY_CONFIG } = process.env;
|
|
if (MY_CONFIG) {
|
|
const { UIDs, TAGs } = JSON.parse(MY_CONFIG);
|
|
if (UIDs) _my_config.UIDs = UIDs;
|
|
if (TAGs) _my_config.TAGs = TAGs;
|
|
}
|
|
} catch (_) {
|
|
tooltip.log("[script]MY_CONFIG语法错误");
|
|
}
|
|
}
|
|
return _my_config;
|
|
})();
|
|
|
|
const script = {
|
|
...default_script,
|
|
...my_config
|
|
}
|
|
|
|
|
|
module.exports = script;
|