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
8a595232e2
commit
b66750b84f
@ -1,6 +1,3 @@
|
||||
import {
|
||||
segment
|
||||
} from "oicq";
|
||||
import fs from "fs";
|
||||
import lodash from "lodash";
|
||||
import {
|
||||
@ -14,9 +11,6 @@ import {
|
||||
} from "../components/index.js";
|
||||
import Common from "../components/Common.js";
|
||||
|
||||
|
||||
const require = createRequire(
|
||||
import.meta.url);
|
||||
let cfgMap = {
|
||||
"体力": "sys.Note",
|
||||
"帮助": "sys.help",
|
||||
|
@ -1,9 +1,6 @@
|
||||
import {
|
||||
Cfg
|
||||
} from "../components/index.js";
|
||||
import {
|
||||
segment
|
||||
} from "oicq";
|
||||
import lodash from "lodash";
|
||||
import {
|
||||
currentVersion,
|
||||
|
@ -1,15 +1,8 @@
|
||||
import miHoYoApi from "../model/mys/mihoyoApi.js"
|
||||
import utils from '../model/mys/utils.js';
|
||||
import User from "../model/user.js"
|
||||
import moment from 'moment';
|
||||
import {
|
||||
Cfg,
|
||||
Data
|
||||
} from "../components/index.js";
|
||||
import {
|
||||
segment
|
||||
} from "oicq";
|
||||
import user from "../model/user.js";
|
||||
export const rule = {
|
||||
sign: {
|
||||
reg: `^#*(原神|崩坏3|崩坏2|未定事件簿)签到$`,
|
||||
@ -107,7 +100,6 @@ export async function bbsSign(e) {
|
||||
await replyMsg(e, res.message);
|
||||
return true;
|
||||
}
|
||||
const _path = process.cwd();
|
||||
let START;
|
||||
export async function sign(e) {
|
||||
let user = new User(e);
|
||||
|
16
apps/user.js
16
apps/user.js
@ -4,19 +4,14 @@ import {
|
||||
Data
|
||||
} from "../components/index.js";
|
||||
import moment from 'moment';
|
||||
import lodash from 'lodash';
|
||||
import Common from "../components/Common.js";
|
||||
import {
|
||||
isV3
|
||||
} from '../components/Changelog.js';
|
||||
import gsCfg from '../model/gsCfg.js';
|
||||
import fs from "fs";
|
||||
import {
|
||||
segment
|
||||
} from "oicq";
|
||||
import YAML from 'yaml'
|
||||
import User from "../model/user.js"
|
||||
import user from '../model/user.js';
|
||||
|
||||
export const rule = {
|
||||
userInfo: {
|
||||
@ -87,7 +82,6 @@ export async function userInfo(e, {
|
||||
render,
|
||||
scale: 1.2
|
||||
})
|
||||
return true;
|
||||
}
|
||||
let configData = gsCfg.getfileYaml(`${_path}/plugins/xiaoyao-cvs-plugin/config/`, "config");
|
||||
export async function gcPaylog(e) {
|
||||
@ -136,12 +130,6 @@ export async function gcPaylog(e){
|
||||
} else {
|
||||
e._reply(`V2暂不支持`);
|
||||
return false
|
||||
//V2暂不支持
|
||||
// let {
|
||||
// bing
|
||||
// } = (await import(`file:///${_path}/lib/app/gachaLog.js`))
|
||||
// e.isPrivate = true;
|
||||
// await bing(e)
|
||||
}
|
||||
}
|
||||
await utils.replyMake(e, sendMsg, 1)
|
||||
@ -229,6 +217,10 @@ export async function mytoken(e) {
|
||||
}
|
||||
|
||||
export async function bindLogin_ticket(e) {
|
||||
if (!e.isPrivate) {
|
||||
e.reply("请私聊发送")
|
||||
return true;
|
||||
}
|
||||
let user = new User(e);
|
||||
let ckMap = await utils.getCookieMap(e.original_msg.replace(/'|"/g, ""))
|
||||
let stuid = ckMap?.get("login_uid") ? ckMap?.get("login_uid") : ckMap?.get("ltuid")
|
||||
|
@ -5,16 +5,12 @@ import fs from "fs";
|
||||
import {
|
||||
Cfg
|
||||
} from "../components/index.js";
|
||||
import Data from "../components/Data.js"
|
||||
import path from 'path';
|
||||
import fetch from "node-fetch";
|
||||
import gsCfg from '../model/gsCfg.js'
|
||||
import {
|
||||
isV3
|
||||
} from '../components/Changelog.js'
|
||||
import utils from "../model/mys/utils.js";
|
||||
const _path = process.cwd();
|
||||
const __dirname = path.resolve();
|
||||
|
||||
const list = ["wuqi_tujian", "shiwu_tujian", "yuanmo_tujian", "mijin_tujian", "shengyiwu_tujian", "daoju_tujian"]
|
||||
const reglist = ["(#|专武|武器|图鉴)", "(#|食物|特殊料理|特色|料理|食材|图鉴)", "(#|原魔|怪物|图鉴|信息)", "(#|秘境|信息|图鉴)", "(#|圣遗物|图鉴|本|套)",
|
||||
|
@ -1,20 +1,13 @@
|
||||
import YAML from 'yaml'
|
||||
import chokidar from 'chokidar'
|
||||
import fs from 'node:fs'
|
||||
import {
|
||||
promisify
|
||||
} from 'node:util'
|
||||
import lodash from 'lodash'
|
||||
import {
|
||||
Data
|
||||
} from "../components/index.js";
|
||||
|
||||
import {
|
||||
isV3
|
||||
} from '../components/Changelog.js';
|
||||
import utils from './mys/utils.js';
|
||||
const plugin = "xiaoyao-cvs-plugin"
|
||||
const pathPlugin=`./plugins/${plugin}/data/`
|
||||
/**
|
||||
* 配置文件
|
||||
* 主要用于处理 stoken以及云原神账号数据
|
||||
|
@ -1,5 +1,4 @@
|
||||
import YAML from 'yaml'
|
||||
import chokidar from 'chokidar'
|
||||
import miHoYoApi from "../model/mys/mihoyoApi.js"
|
||||
import fs from 'node:fs'
|
||||
import lodash from 'lodash'
|
||||
@ -15,11 +14,6 @@ import {
|
||||
import moment from 'moment'
|
||||
const _path = process.cwd();
|
||||
const plugin = "xiaoyao-cvs-plugin"
|
||||
const RETRY_OPTIONS = {
|
||||
retries: 3,
|
||||
minTimeout: 5000,
|
||||
maxTimeout: 10000
|
||||
};
|
||||
const nameData = ["原神", "崩坏3", "崩坏2", "未定事件簿"];
|
||||
const yamlDataUrl = `${_path}/plugins/xiaoyao-cvs-plugin/data/yaml`;
|
||||
const cloudDataUrl = `${_path}/plugins/xiaoyao-cvs-plugin/data/yunToken/`
|
||||
|
@ -33,6 +33,7 @@
|
||||
- 冬极
|
||||
- 冬季
|
||||
- 公子
|
||||
- 白星
|
||||
- 达达利亚
|
||||
- 鸭鸭
|
||||
- 达达鸭
|
||||
|
@ -450,11 +450,13 @@
|
||||
- 火使徒
|
||||
- 火咏者
|
||||
- 深渊使徒渊火
|
||||
- 深渊咏者渊火
|
||||
深渊咏者·紫电:
|
||||
- 紫电
|
||||
- 雷使徒
|
||||
- 雷咏者
|
||||
- 深渊使徒紫电
|
||||
- 深渊咏者紫电
|
||||
火深渊法师:
|
||||
- 火法师
|
||||
- 火法
|
||||
|
@ -41,6 +41,37 @@ export const helpList = [{
|
||||
"desc": "重写原有的查询当前米游社体力"
|
||||
},
|
||||
]
|
||||
},{
|
||||
"group": "stoken功能",
|
||||
"list": [{
|
||||
"icon": 75,
|
||||
"title": "#更新抽卡记录",
|
||||
"desc": "(更新|获取) 抽卡记录"
|
||||
},
|
||||
{
|
||||
"icon": 74,
|
||||
"title": "#mys原神签到",
|
||||
"desc": "社区米游币获取(由于有验证码大概会失败)"
|
||||
},
|
||||
{
|
||||
"icon": 92,
|
||||
"title": "#刷新ck",
|
||||
"desc": "重置当前cookie"
|
||||
},
|
||||
]
|
||||
},{
|
||||
"group": "其他功能",
|
||||
"list": [{
|
||||
"icon": 77,
|
||||
"title": "#云原神签到",
|
||||
"desc": "云原神签到"
|
||||
},
|
||||
{
|
||||
"icon": 78,
|
||||
"title": "#崩坏三签到",
|
||||
"desc": "其余模块签到支持(崩坏3|崩坏2|未定义)"
|
||||
},
|
||||
]
|
||||
},{
|
||||
"group": "管理命令,仅管理员可用",
|
||||
"auth": "master",
|
||||
|
Loading…
Reference in New Issue
Block a user