feat:下载、删除图片资源

This commit is contained in:
bietiaop 2024-07-14 23:36:17 +08:00
parent 65652f87ef
commit b450b7f08b
8 changed files with 180 additions and 7 deletions

View file

@ -39,7 +39,7 @@ export class Panel extends ZZZPlugin {
const { api, deviceFp } = await this.getAPI();
if (!api) return false;
await redis.set(`ZZZ:PANEL:${uid}:LASTTIME`, Date.now());
await this.reply('正在刷新面板列表,请稍...');
await this.reply('正在刷新面板列表,请稍...');
await this.getPlayerInfo();
const result = await refreshPanel(this.e, api, uid, deviceFp);
const newChar = result.filter(item => item.isNew);
@ -83,8 +83,13 @@ export class Panel extends ZZZPlugin {
await this.reply(`未找到角色${name}的面板信息`);
return;
}
await this.reply('正在下载面板图片资源,请稍后...');
const timer = setTimeout(() => {
if (this?.reply) {
this.reply('查询成功,正在下载图片资源,请稍候。');
}
}, 3000);
await data.get_detail_assets();
clearTimeout(timer);
const finalData = {
charData: data,
};