From 45d836c62c033e0cd43add62fdd64d97cdd5c3be Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Wed, 12 Apr 2023 12:29:25 +0300 Subject: [PATCH] Fix poe custom bot download. Don't display deleted bots --- poe-client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/poe-client.js b/poe-client.js index 5bb035f9c..01db60f1b 100644 --- a/poe-client.js +++ b/poe-client.js @@ -148,8 +148,8 @@ class Client { const botList = viewer.availableBots; const bots = {}; - for (const bot of botList) { - const url = `https://poe.com/_next/data/${this.next_data.buildId}/${bot.displayName.toLowerCase()}.json`; + for (const bot of botList.filter(x => x.deletionState == 'not_deleted')) { + const url = `https://poe.com/_next/data/${this.next_data.buildId}/${bot.displayName}.json`; logger.info(`Downloading ${url}`); const r = await request_with_retries(() => this.session.get(url));