Fix poe custom bot download. Don't display deleted bots

This commit is contained in:
SillyLossy
2023-04-12 12:29:25 +03:00
parent 415af67ea3
commit 45d836c62c

View File

@@ -148,8 +148,8 @@ class Client {
const botList = viewer.availableBots; const botList = viewer.availableBots;
const bots = {}; const bots = {};
for (const bot of botList) { for (const bot of botList.filter(x => x.deletionState == 'not_deleted')) {
const url = `https://poe.com/_next/data/${this.next_data.buildId}/${bot.displayName.toLowerCase()}.json`; const url = `https://poe.com/_next/data/${this.next_data.buildId}/${bot.displayName}.json`;
logger.info(`Downloading ${url}`); logger.info(`Downloading ${url}`);
const r = await request_with_retries(() => this.session.get(url)); const r = await request_with_retries(() => this.session.get(url));