mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 13:17:32 +00:00
fix:调整回复内容#136
This commit is contained in:
parent
33a1bd5d39
commit
e51087519b
1 changed files with 3 additions and 2 deletions
|
|
@ -66,6 +66,7 @@ export class Panel extends ZZZPlugin {
|
||||||
const isEnka = this.e.msg.includes('展柜') || !(await getCk(this.e))
|
const isEnka = this.e.msg.includes('展柜') || !(await getCk(this.e))
|
||||||
let result
|
let result
|
||||||
if (isEnka) {
|
if (isEnka) {
|
||||||
|
await this.reply('正在更新面板列表,请稍候...');
|
||||||
const data = await refreshPanelFromEnka(uid)
|
const data = await refreshPanelFromEnka(uid)
|
||||||
.catch(err => err)
|
.catch(err => err)
|
||||||
if (data instanceof Error) {
|
if (data instanceof Error) {
|
||||||
|
|
@ -85,7 +86,7 @@ export class Panel extends ZZZPlugin {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const { api, deviceFp } = await this.getAPI();
|
const { api, deviceFp } = await this.getAPI();
|
||||||
await this.reply('正在更新面板列表,请稍候...');
|
await this.reply('正在更新面板列表,请稍候...\n账号异常时,可尝试%更新展柜面板(所更新角色数据与实际不一致时,请提issue)');
|
||||||
await this.getPlayerInfo();
|
await this.getPlayerInfo();
|
||||||
await redis.set(`ZZZ:PANEL:${uid}:LASTTIME`, Date.now());
|
await redis.set(`ZZZ:PANEL:${uid}:LASTTIME`, Date.now());
|
||||||
result = await refreshPanelFunction(api, deviceFp).catch(e => {
|
result = await refreshPanelFunction(api, deviceFp).catch(e => {
|
||||||
|
|
@ -94,7 +95,7 @@ export class Panel extends ZZZPlugin {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!result) {
|
if (!result) {
|
||||||
await this.reply('面板列表更新失败,请稍后再试\n账号异常时,可尝试%更新展柜面板(所更新角色数据与实际不一致时,请提issue)');
|
await this.reply('面板列表更新失败,请稍后再试');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const newChar = result.filter(item => item.isNew);
|
const newChar = result.filter(item => item.isNew);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue