Merge pull request #10 from wah-su/main

fix: adding index.json to packs list when generating it 2nd time
This commit is contained in:
Kentai Radiquum 2025-01-15 22:44:14 +05:00 committed by GitHub
commit 48a95cbd6e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,7 +10,7 @@ let Packs = [];
const dirents = fs.readdirSync(config.stickerPacksDir, { withFileTypes: true });
const files = dirents
.filter(dirent => dirent.isFile())
.filter(dirent => dirent.name.endsWith(".json"))
.filter(dirent => (dirent.name.endsWith(".json") && dirent.name != "index.json"))
.map(dirent => dirent.name);
if (files.length == 0) {
console.error("[ERROR] NO Sticker Packs Found!");