Send error if no waifu is found in the dict

pull/8/head
sgoudham 4 years ago
parent 1672e8d091
commit c411d417fc

@ -258,6 +258,7 @@ class Anime(Cog):
else:
await ctx.send("Something went wrong!")
if len(waifu_dict["data"]) > 0:
for waifu in waifu_dict["data"]:
if waifu["type"] in ["Waifu", "Husbando"]:
waifus_dict[waifu["name"]] = {}
@ -265,6 +266,10 @@ class Anime(Cog):
store_waifus(waifus_dict, waifu, value)
else:
break
else:
embed = Embed(description="**Waifu Not Found!**",
colour=enso_embedmod_colours)
await ctx.send(embed=embed)
bot = ctx.guild.get_member(self.bot.user.id)

Loading…
Cancel
Save