1
0
Fork 0
mirror of https://github.com/uhIgnacio/EmoteManager.git synced 2024-08-15 02:23:13 +00:00

add-from-ec: handle cases where the API is down

This commit is contained in:
bmintz 2018-08-14 00:16:43 -05:00
parent 9cd8ed4189
commit 08aef03d6b

View file

@ -141,6 +141,9 @@ class Emotes:
) as resp:
if resp.status == 404:
return await context.send("Emote not found in Emoji Connoisseur's database.")
if resp.status != 200:
return await context.send(
f'Error: the Emoji Connoisseur API returned status code {resp.status}')
emote = await resp.json()