2022-06-25 23:45:43 +00:00
|
|
|
export {
|
2022-04-29 21:54:41 +00:00
|
|
|
character,
|
|
|
|
getProfile,
|
|
|
|
wife,
|
2022-07-06 22:12:05 +00:00
|
|
|
pokeWife,
|
2022-04-29 21:54:41 +00:00
|
|
|
enemyLv,
|
2022-06-25 23:45:43 +00:00
|
|
|
profileArtisList,
|
2022-04-29 21:54:41 +00:00
|
|
|
getProfileAll,
|
2022-06-11 08:22:29 +00:00
|
|
|
profileHelp,
|
2022-06-27 20:46:49 +00:00
|
|
|
getOriginalPicture,
|
|
|
|
uploadCharacterImg
|
2022-04-29 21:54:41 +00:00
|
|
|
} from "./apps/character.js";
|
2022-06-27 20:46:49 +00:00
|
|
|
|
2022-06-25 23:45:43 +00:00
|
|
|
import { wifeReg } from "./apps/character.js";
|
|
|
|
|
2022-07-03 20:51:27 +00:00
|
|
|
import { consStat, abyssPct, abyssTeam, uploadData } from "./apps/stat.js";
|
2022-05-06 21:20:14 +00:00
|
|
|
import { wiki, calendar } from "./apps/wiki.js";
|
2022-04-26 19:15:30 +00:00
|
|
|
import { help, versionInfo } from "./apps/help.js";
|
2022-04-06 19:51:44 +00:00
|
|
|
import lodash from "lodash";
|
2022-04-26 14:25:47 +00:00
|
|
|
import common from "../../lib/common.js";
|
2022-05-28 21:18:13 +00:00
|
|
|
import { rule as adminRule, updateRes, sysCfg, updateMiaoPlugin, profileCfg } from "./apps/admin.js";
|
2022-05-22 13:10:10 +00:00
|
|
|
import { currentVersion } from "./components/Changelog.js";
|
2022-06-27 20:46:49 +00:00
|
|
|
|
2022-04-03 11:14:38 +00:00
|
|
|
|
2022-04-26 19:15:30 +00:00
|
|
|
export {
|
|
|
|
consStat,
|
|
|
|
abyssPct,
|
2022-05-04 20:53:20 +00:00
|
|
|
abyssTeam,
|
2022-04-26 19:15:30 +00:00
|
|
|
wiki,
|
|
|
|
updateRes,
|
|
|
|
updateMiaoPlugin,
|
|
|
|
sysCfg,
|
|
|
|
help,
|
|
|
|
versionInfo,
|
2022-05-28 21:18:13 +00:00
|
|
|
calendar,
|
2022-07-03 20:51:27 +00:00
|
|
|
profileCfg,
|
|
|
|
uploadData
|
2022-04-26 19:15:30 +00:00
|
|
|
};
|
2022-04-03 11:14:38 +00:00
|
|
|
|
|
|
|
|
2022-04-06 19:51:44 +00:00
|
|
|
let rule = {
|
2022-03-26 08:21:44 +00:00
|
|
|
character: {
|
2022-05-31 21:16:10 +00:00
|
|
|
reg: "^(#(.*)|#*(更新|录入)?(.*)(详细|详情|面板|面版|伤害[1-7]?)(更新)?)$",
|
2022-05-05 10:10:29 +00:00
|
|
|
//reg: "noCheck",
|
2022-04-14 20:53:22 +00:00
|
|
|
describe: "【#角色】角色详情",
|
2022-03-26 21:34:33 +00:00
|
|
|
},
|
2022-06-27 20:46:49 +00:00
|
|
|
uploadCharacterImg: {
|
|
|
|
reg: "^#*(喵喵)?(上传|添加)(.+)(照片|写真|图片|图像)\\s*$",
|
|
|
|
describe: "喵喵上传角色写真",
|
|
|
|
},
|
2022-06-26 01:05:37 +00:00
|
|
|
profileArtisList: {
|
2022-06-04 21:29:24 +00:00
|
|
|
reg: "^#圣遗物列表\\s*(\\d{9})?$",
|
2022-04-28 20:50:58 +00:00
|
|
|
describe: "【#角色】圣遗物列表",
|
|
|
|
},
|
|
|
|
getProfileAll: {
|
2022-06-04 21:29:24 +00:00
|
|
|
reg: "^#(面板角色|角色面板|面板)(列表)?\\s*(\\d{9})?$",
|
2022-04-29 21:54:41 +00:00
|
|
|
describe: "【#角色】查看当前已获取面板数据的角色列表",
|
|
|
|
},
|
|
|
|
profileHelp: {
|
2022-05-02 22:59:53 +00:00
|
|
|
reg: "^#角色面板帮助$",
|
2022-04-28 20:50:58 +00:00
|
|
|
describe: "【#角色】查看当前已获取面板数据的角色列表",
|
|
|
|
},
|
2022-03-27 13:12:00 +00:00
|
|
|
wife: {
|
2022-04-03 11:14:38 +00:00
|
|
|
reg: wifeReg,
|
2022-04-14 20:53:22 +00:00
|
|
|
describe: "【#角色】#老公 #老婆 查询",
|
2022-03-27 13:12:00 +00:00
|
|
|
},
|
2022-07-06 22:12:05 +00:00
|
|
|
pokeWife: {
|
|
|
|
reg: "#poke#",
|
|
|
|
describe: "【#角色】戳一戳",
|
|
|
|
},
|
2022-06-11 08:22:29 +00:00
|
|
|
getOriginalPicture: {
|
2022-06-11 18:58:40 +00:00
|
|
|
reg: "^#?(获取|给我|我要|求|发|发下|发个|发一下)?原图(吧|呗)?$",
|
2022-06-11 08:22:29 +00:00
|
|
|
describe: "【#原图】 回复角色卡片,可获取原图",
|
|
|
|
},
|
2022-04-04 21:36:44 +00:00
|
|
|
consStat: {
|
2022-06-06 20:59:47 +00:00
|
|
|
reg: "^#(喵喵)?角色(持有|持有率|命座|命之座|.命)(分布|统计|持有|持有率)?$",
|
2022-04-14 20:53:22 +00:00
|
|
|
describe: "【#统计】 #角色持有率 #角色5命统计",
|
2022-04-04 21:36:44 +00:00
|
|
|
},
|
|
|
|
abyssPct: {
|
2022-04-10 20:48:53 +00:00
|
|
|
reg: "^#(喵喵)?深渊(第?.{1,2}层)?(角色)?出场(率|统计)*$",
|
2022-04-14 20:53:22 +00:00
|
|
|
describe: "【#统计】 #深渊出场率 #深渊12层出场率",
|
2022-04-06 19:51:44 +00:00
|
|
|
},
|
2022-05-04 20:53:20 +00:00
|
|
|
abyssTeam: {
|
|
|
|
reg: "#深渊(组队|配队)",
|
|
|
|
describe: "【#角色】 #深渊组队",
|
|
|
|
},
|
2022-04-03 22:06:03 +00:00
|
|
|
wiki: {
|
2022-06-27 20:46:49 +00:00
|
|
|
reg: "^(#|喵喵)?.*(天赋|技能|命座|命之座|资料|照片|写真|图片|图像)$",
|
2022-04-14 20:53:22 +00:00
|
|
|
describe: "【#资料】 #神里天赋 #夜兰命座",
|
2022-04-10 20:48:53 +00:00
|
|
|
},
|
|
|
|
help: {
|
2022-04-14 20:53:22 +00:00
|
|
|
reg: "^#?(喵喵)?(命令|帮助|菜单|help|说明|功能|指令|使用说明)$",
|
|
|
|
describe: "【#帮助】 #喵喵帮助",
|
|
|
|
},
|
|
|
|
getProfile: {
|
2022-06-04 21:29:24 +00:00
|
|
|
reg: "^#(全部面板更新|更新全部面板|获取游戏角色详情|更新面板|面板更新)\\s*(\\d{9})?$",
|
2022-04-14 20:53:22 +00:00
|
|
|
describe: "【#角色】 获取游戏橱窗详情数据",
|
2022-04-08 21:32:54 +00:00
|
|
|
},
|
2022-04-24 19:22:27 +00:00
|
|
|
enemyLv: {
|
2022-04-29 21:54:41 +00:00
|
|
|
reg: "^#(敌人|怪物)等级\\s*\\d{1,3}\\s*$",
|
2022-04-24 19:22:27 +00:00
|
|
|
describe: "【#角色】 设置伤害计算中目标敌人的等级",
|
|
|
|
},
|
2022-04-26 19:15:30 +00:00
|
|
|
versionInfo: {
|
2022-06-27 20:46:49 +00:00
|
|
|
reg: "^#?喵喵版本$",
|
2022-04-26 19:15:30 +00:00
|
|
|
describe: "【#帮助】 喵喵版本介绍",
|
|
|
|
},
|
2022-05-06 21:20:14 +00:00
|
|
|
calendar: {
|
2022-06-28 20:30:34 +00:00
|
|
|
reg: "^(#|喵喵)+(日历|日历列表)$",
|
2022-05-06 21:20:14 +00:00
|
|
|
describe: "【#日历】 活动日历",
|
|
|
|
},
|
2022-07-03 20:51:27 +00:00
|
|
|
uploadData: {
|
|
|
|
reg: "^#上传深渊数据$"
|
|
|
|
},
|
2022-04-08 21:32:54 +00:00
|
|
|
...adminRule
|
2022-03-26 21:34:33 +00:00
|
|
|
};
|
2022-03-26 08:21:44 +00:00
|
|
|
|
2022-04-06 19:51:44 +00:00
|
|
|
lodash.forEach(rule, (r) => {
|
|
|
|
r.priority = r.priority || 50;
|
|
|
|
r.prehash = true;
|
2022-04-08 21:32:54 +00:00
|
|
|
r.hashMark = true;
|
2022-04-06 19:51:44 +00:00
|
|
|
});
|
|
|
|
|
2022-04-16 09:40:30 +00:00
|
|
|
export { rule };
|
|
|
|
|
2022-04-30 21:06:17 +00:00
|
|
|
console.log(`喵喵插件${currentVersion}初始化~`);
|
2022-04-26 14:25:47 +00:00
|
|
|
|
|
|
|
setTimeout(async function () {
|
|
|
|
let msgStr = await redis.get("miao:restart-msg");
|
|
|
|
if (msgStr) {
|
|
|
|
let msg = JSON.parse(msgStr);
|
|
|
|
await common.relpyPrivate(msg.qq, msg.msg);
|
|
|
|
await redis.del("miao:restart-msg");
|
2022-05-22 13:10:10 +00:00
|
|
|
let msgs = [`当前喵喵版本: ${currentVersion}`, `您可使用 #喵喵版本 命令查看更新信息`];
|
2022-04-26 14:25:47 +00:00
|
|
|
await common.relpyPrivate(msg.qq, msgs.join("\n"));
|
|
|
|
}
|
|
|
|
}, 1000);
|