mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2024-12-22 19:10:53 +08:00
新增默认配置文件、支持定义签到指定游戏模块
This commit is contained in:
parent
c8cf523d1b
commit
16cb65184a
@ -61,6 +61,7 @@ cnpm i promise-retry
|
||||
9. 其余具体功能通过 #图鉴帮助 #图鉴版本 查看
|
||||
10. 发送 #崩坏3签到 可签到崩坏3游戏模块 具体支持【崩坏3、崩坏2、未定义事件】
|
||||
11. 发送 #云原神签到 可签到云原神游戏
|
||||
12. 默认配置文件位于 ./plugins/xiaoyao-cvs-plugin/defSet/config/config.yaml
|
||||
|
||||
## 其他
|
||||
<!---
|
||||
|
39
apps/sign.js
39
apps/sign.js
@ -15,9 +15,22 @@ import {
|
||||
segment
|
||||
} from "oicq";
|
||||
import YAML from 'yaml'
|
||||
|
||||
const _path = process.cwd();
|
||||
let START = moment().unix();
|
||||
const TODAY_DATE = moment().format('YYYY-MM-DD');
|
||||
const RETRY_OPTIONS = {
|
||||
retries: 3,
|
||||
minTimeout: 5000,
|
||||
maxTimeout: 10000
|
||||
};
|
||||
let YamlDataUrl = `${_path}/plugins/xiaoyao-cvs-plugin/data/yaml`;
|
||||
let yunpath=`${_path}/plugins/xiaoyao-cvs-plugin/data/yunToken/`;
|
||||
let configSign=gsCfg.getfileYaml(`${_path}/plugins/xiaoyao-cvs-plugin/config/`, "config");
|
||||
configSign.signlist=configSign.signlist||"原神|崩坏3|崩坏2|未定事件簿".split("|")
|
||||
export const rule = {
|
||||
mysSign: {
|
||||
reg: "^#*(米游社|mys|社区)(原神|崩坏3|崩坏2|未定事件簿|大别野|崩坏星穹铁道|绝区零|全部)签到$",
|
||||
reg: `^#*(米游社|mys|社区)(原神|崩坏3|崩坏2|未定事件簿|大别野|崩坏星穹铁道|绝区零|全部)签到$`,
|
||||
describe: "米游社米游币签到(理论上会签到全部所以区分开了)"
|
||||
},
|
||||
bbsSeach:{
|
||||
@ -25,7 +38,7 @@ export const rule = {
|
||||
describe: "米币查询"
|
||||
},
|
||||
sign: {
|
||||
reg: "^#*(崩坏3|崩坏2|未定事件簿)签到$",
|
||||
reg: `^#*(${configSign.signlist.join("|")})签到$`,
|
||||
describe: "米社规则签到"
|
||||
},
|
||||
signlist: {
|
||||
@ -40,10 +53,10 @@ export const rule = {
|
||||
reg: "^#*云原神签到$",
|
||||
describe: "云原神签到"
|
||||
},
|
||||
delSign:{
|
||||
reg: "^#*删除(我的)*(stoken|云原神)$",
|
||||
describe: "删除云原神、stoken数据"
|
||||
},
|
||||
// delSign:{
|
||||
// reg: "^#*删除(我的)*(stoken|云原神)$",
|
||||
// describe: "删除云原神、stoken数据"
|
||||
// },
|
||||
yunAllSign: {
|
||||
reg: "^#云原神全部签到$",
|
||||
describe: "云原神全部签到"
|
||||
@ -61,18 +74,6 @@ export const rule = {
|
||||
describe: "cookies获取帮助"
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const _path = process.cwd();
|
||||
let START = moment().unix();
|
||||
const TODAY_DATE = moment().format('YYYY-MM-DD');
|
||||
const RETRY_OPTIONS = {
|
||||
retries: 3,
|
||||
minTimeout: 5000,
|
||||
maxTimeout: 10000
|
||||
};
|
||||
let YamlDataUrl = `${_path}/plugins/xiaoyao-cvs-plugin/data/yaml`;
|
||||
let yunpath=`${_path}/plugins/xiaoyao-cvs-plugin/data/yunToken/`;
|
||||
init()
|
||||
function init() {
|
||||
Data.createDir("",yunpath , false);
|
||||
@ -94,7 +95,7 @@ export async function sign(e) {
|
||||
let ForumData = await getDataList(msg);
|
||||
e.reply(`开始尝试${msg}签到预计${msg=='全部'?"60":"5-10"}秒~`)
|
||||
for (let forum of ForumData) {
|
||||
if (!(["崩坏3", "崩坏2", "未定事件簿"].includes(forum.name))) {
|
||||
if (!(configSign.signlist.includes(forum.name))) {
|
||||
continue;
|
||||
}
|
||||
resultMessage += `**${forum.name}**\n`
|
||||
|
@ -1,16 +0,0 @@
|
||||
# 原神模拟十连设置
|
||||
default:
|
||||
# 每日抽卡数
|
||||
count: 1
|
||||
# 撤回消息 0-120 秒, 0不撤回
|
||||
delMsg: 110
|
||||
# 角色池,武器池限制次数分开计算 1-分开 0-不分开
|
||||
LimitSeparate: 0
|
||||
|
||||
# 群单独设置
|
||||
123465:
|
||||
count: 10
|
||||
# 撤回消息 0-120 秒, 0不撤回
|
||||
delMsg: 110
|
||||
# 角色池,武器池限制次数分开计算 1-分开 0-不分开
|
||||
LimitSeparate: 0
|
@ -1,3 +0,0 @@
|
||||
# 米游社公共查询ck,支持多个一行一个,横杆空格开头
|
||||
- ltoken=xxx; ltuid=xxx; cookie_token=xxx; account_id=xxx;
|
||||
- ltoken=xxx; ltuid=xxx; cookie_token=xxx; account_id=xxx;
|
@ -1,6 +0,0 @@
|
||||
# 公共查询是否使用用户ck 0-不使用 1-使用
|
||||
allowUseCookie: 0
|
||||
# 默认cookie帮助文档链接地址
|
||||
cookieDoc: docs.qq.com/doc/DUWNVQVFTU3liTVlO
|
||||
# 米游社原神签到定时任务,Cron表达式,默认00:02开始执行,每10s签到一个
|
||||
signTime: 0 2 0 * * ?
|
35
defSet/config/config.yaml
Normal file
35
defSet/config/config.yaml
Normal file
@ -0,0 +1,35 @@
|
||||
#此文件为默认配置请勿修改此文件
|
||||
|
||||
# cookies教程
|
||||
cookiesDoc: docs.qq.com/doc/DV2tDY2ltSFdtbU9z
|
||||
# 米币签到成功是否推送
|
||||
isPushSign: false
|
||||
# 米游社米币签到定时任务,Cron表达式,默认00:02开始执行签到
|
||||
mysBbsTime: 0 2 0 * * ?
|
||||
# 米币是否自动签到
|
||||
ismysSign: true
|
||||
|
||||
# 签到成功是否推送
|
||||
isAllSign: false
|
||||
# 米游社签到定时任务,Cron表达式,默认00:02开始执行签到
|
||||
allSignTime: 0 2 0 * * ?
|
||||
# 是否自动签到
|
||||
isSign: true
|
||||
# 默认签到游戏模板 仅支持 原神|崩坏3|崩坏2|未定事件簿
|
||||
signlist:
|
||||
- 原神
|
||||
- 崩坏3
|
||||
- 崩坏2
|
||||
- 未定事件簿
|
||||
|
||||
# 云原神是否自动签到
|
||||
isYunSign: true
|
||||
# 米游社签到定时任务,Cron表达式,默认04:02开始执行签到
|
||||
YunSignTime: 0 2 4 * * ?
|
||||
# 云原神签到成功是否推送
|
||||
isYunSignMsg: false
|
||||
# 云原神帮助
|
||||
yunDoc: docs.qq.com/doc/DTnJIREZwTmxEVHBl
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user