mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-17 21:57:44 +00:00
fix:攻略提示
This commit is contained in:
parent
2c745c256e
commit
7bb1fd71a4
1 changed files with 10 additions and 5 deletions
|
|
@ -106,7 +106,7 @@ export class Guide extends ZZZPlugin {
|
||||||
group = _.get(settings.getConfig('guide'), 'default_guide', 1).toString(),
|
group = _.get(settings.getConfig('guide'), 'default_guide', 1).toString(),
|
||||||
] = this.e.msg.match(reg);
|
] = this.e.msg.match(reg);
|
||||||
// all -> 0
|
// all -> 0
|
||||||
if (group == 'all') {
|
if (group === 'all') {
|
||||||
group = '0';
|
group = '0';
|
||||||
}
|
}
|
||||||
group = Number(group);
|
group = Number(group);
|
||||||
|
|
@ -128,15 +128,23 @@ export class Guide extends ZZZPlugin {
|
||||||
// msg.push(segment.image(`file://${guidePath}`));
|
// msg.push(segment.image(`file://${guidePath}`));
|
||||||
if (guidePath) {
|
if (guidePath) {
|
||||||
msg.push(segment.image(guidePath));
|
msg.push(segment.image(guidePath));
|
||||||
|
} else {
|
||||||
|
msg.push(`暂无${name}攻略 (${this.source[i - 1]})`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (msg.length) {
|
if (msg.length) {
|
||||||
await this.reply(await common.makeForwardMsg(this.e, [msg]));
|
await this.reply(await common.makeForwardMsg(this.e, msg));
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const guidePath = await this.getGuidePath(group, name, !!isUpdate);
|
const guidePath = await this.getGuidePath(group, name, !!isUpdate);
|
||||||
|
if (!guidePath) {
|
||||||
|
this.e.reply(
|
||||||
|
`暂无${name}攻略 (${this.source[group - 1]})\n请尝试其他的攻略来源查询`
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
await this.e.reply(segment.image(guidePath));
|
await this.e.reply(segment.image(guidePath));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -182,9 +190,6 @@ export class Guide extends ZZZPlugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!url) {
|
if (!url) {
|
||||||
this.e.reply(
|
|
||||||
`暂无${name}攻略 (${this.source[group - 1]})\n请尝试其他的攻略来源查询`
|
|
||||||
);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
logger.debug(
|
logger.debug(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue