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:
parent
9cd8ed4189
commit
08aef03d6b
1 changed files with 3 additions and 0 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue