修正#喵喵帮助中的文案错误

This commit is contained in:
yoimiya-kokomi 2022-06-12 05:54:41 +08:00
parent 9d6a6cbf8b
commit dffeef4497
4 changed files with 31 additions and 19 deletions

View File

@ -5,8 +5,9 @@
* `#角色面板` 圣遗物评分功能调整
* 修复小攻击、小防御、小生命有效词条未被正确高亮的问题
* 调整部分角色的评分词条权重值
* `#更新角色面板` 功能恢复
* 可对已有面板数据的角色手工输入面板属性,用于伤害测算
* `#录入角色面板` 功能恢复
* 可对已有面板数据的角色手工输入更改面板属性,用于伤害测算
* 例如`#录入雷神面板 暴击80爆伤250`
* 暂不支持设置武器、圣遗物、命座、天赋。后续会增加支持
# 1.7.1 ~ 1.7.3

View File

@ -403,7 +403,7 @@ async function renderCard(e, avatar, render, renderType = "card") {
}, { e, render, scale: 1.6 });
if (msgRes && msgRes.message_id) {
// 如果消息发送成功就将message_id和图片路径存起来1小时过期
await redis.set(`miao:original-picture:${msgRes.message_id}`, bg.img, {EX: 3600});
await redis.set(`miao:original-picture:${msgRes.message_id}`, bg.img, { EX: 3600 });
}
return msgRes;
}
@ -676,20 +676,33 @@ async function getTargetUid(e) {
return uidRet[0]
}
let MysApi = await e.getMysApi({
auth: "all",
targetType: "all",
cookieType: "all"
});
let uid = false;
if (!MysApi || !e.targetUser) {
return false;
}
try {
let MysApi = await e.getMysApi({
auth: "all",
targetType: "all",
cookieType: "all"
});
let uid = e.targetUser.uid;
if (!uid || !uidReg.test(uid)) {
e.reply("请先发送【#绑定+你的UID】来绑定查询目标")
return false;
if (!MysApi || !e.targetUser) {
return false;
}
uid = e.targetUser.uid;
if (!uid || !uidReg.test(uid)) {
e.reply("请先发送【#绑定+你的UID】来绑定查询目标")
return false;
}
} catch (e) {
let qq = e.user_id;
uid = await redis.get(`genshin:id-uid:${qq}`) || await Cache.get(`genshin:uid:${qq}`);
if (uid && uidReg.test(uid)) {
return uid;
} else {
e.reply("请先发送【#绑定+你的UID】来绑定查询目标");
return false;
}
}
return uid;
@ -956,7 +969,7 @@ export async function getProfileAll(e) {
let chars = [];
lodash.forEach(profiles || [], (ds) => {
if (ds.dataSource !== "enka") {
if (!['enka', 'input2'].includes(ds.dataSource)) {
return;
}
ds.name && chars.push(ds.name)

View File

@ -168,7 +168,7 @@ let Profile = {
let { avatar, inputData } = e;
let char = Character.get(avatar);
let originalData = Profile.get(uid, char.id);
if (!originalData || originalData.dataSource !== "enka") {
if (!originalData || !['enka', 'input2'].includes(originalData.dataSource)) {
return `请先获取${char.name}的面板数据后,再进行面板数据更新`;
}
inputData = inputData.replace("#", "");

View File

@ -39,11 +39,9 @@ let Reliquaries = {
titleWeight[aTitle] = attrWeight[attr] || 0;
if (/大/.test(aTitle)) {
let sTitle = aTitle.replace("大", "小");
console.log(sTitle, aTitle, attrWeight[attr])
titleWeight[sTitle] = titleWeight[aTitle];
}
})
console.log(titleWeight);
charCfg[name] = {
weight: attrWeight,
mark: attrMark,