Save character data bank attachments as non-exportable

This commit is contained in:
Cohee
2024-04-18 22:16:51 +03:00
parent 59bb04f1b3
commit f4f0a59e90
4 changed files with 41 additions and 19 deletions

View File

@ -61,6 +61,20 @@ export class ScraperManager {
}
return scraper.scrape();
}
/**
* Check if a scraper is available.
* @param {string} scraperId ID of the scraper to check
* @returns {Promise<boolean>} Whether the scraper is available
*/
static isScraperAvailable(scraperId) {
const scraper = ScraperManager.#scrapers.find(s => s.id === scraperId);
if (!scraper) {
console.warn(`Scraper with ID ${scraperId} not found`);
return;
}
return scraper.isAvailable();
}
}
/**