🪛 chore: 清除多余逻辑

This commit is contained in:
zhiyu1998 2024-11-22 00:02:51 +08:00
parent e05996ef3a
commit 6220016ace

View File

@ -110,11 +110,6 @@ import { textArrayToMakeForward, sendMusicCard } from "../utils/yunzai-util.js";
export class tools extends plugin {
/**
* 用于计数applemusic达到一定数量清理文件
* @type {number}
*/
static #amCount = 0;
/**
* 构造安全的命令
* @type {{existsPromptKey: string, existsTransKey: string}}
@ -2347,15 +2342,6 @@ export class tools extends plugin {
await this.uploadGroupFile(e, `${musicPath}/${other}`);
}
}
// 计数
tools.#amCount += 1;
logger.info(`当前${freyrName}已经下载了:${tools.#amCount}`);
// 定时清理
if (tools.#amCount >= 5) {
await deleteFolderRecursive(currentWorkingDirectory + "/am");
// 重置
tools.#amCount = 0;
}
return true;
}