mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Hotfix for twitch alert system
Streams were erroneously marked as inexistant in case of error. Most likely fixed.
This commit is contained in:
parent
cc8b4b0585
commit
be4ccc4bfc
5
red.py
5
red.py
@ -1387,8 +1387,9 @@ async def twitchAlert():
|
||||
try:
|
||||
url = "https://api.twitch.tv/kraken/streams/" + stream["NAME"]
|
||||
data = requests.get(url).json()
|
||||
if "error" in data: #Stream doesn't exist, remove from list
|
||||
to_delete.append(stream)
|
||||
if "status" in data:
|
||||
if data["status"] == 404: #Stream doesn't exist, remove from list
|
||||
to_delete.append(stream)
|
||||
elif "stream" in data:
|
||||
if data["stream"] != None:
|
||||
if not stream["ALREADY_ONLINE"]:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user