[General] Fix KeyError in [p]urban

Resolves #2841.

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
Toby Harradine 2019-07-07 18:51:36 +10:00
parent f2039300c2
commit 2bdc3ac10c

View File

@ -274,7 +274,7 @@ class General(commands.Cog):
return
if data.get("error") != 404:
if not data["list"]:
if not data.get("list"):
return await ctx.send(_("No Urban Dictionary entries were found."))
if await ctx.embed_requested():
# a list of embeds