Sometimes the Twitch API's streams endpoint can return someone as offline, even if they are online. They also cache the data on their end, so you can't simply do 2 queries in a row. This means the bot sometimes attempts to host on a channel that is currently online.
The best solution I can think to this is to check the API, wait 1 minute, then check it again and combine the results. Maybe the check needs to be even longer?
Sometimes the Twitch API's
streams
endpoint can return someone as offline, even if they are online. They also cache the data on their end, so you can't simply do 2 queries in a row. This means the bot sometimes attempts to host on a channel that is currently online.The best solution I can think to this is to check the API, wait 1 minute, then check it again and combine the results. Maybe the check needs to be even longer?