Send error if no waifu is found in the dict

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

@ -258,13 +258,18 @@ class Anime(Cog):
else: else:
await ctx.send("Something went wrong!") await ctx.send("Something went wrong!")
for waifu in waifu_dict["data"]: if len(waifu_dict["data"]) > 0:
if waifu["type"] in ["Waifu", "Husbando"]: for waifu in waifu_dict["data"]:
waifus_dict[waifu["name"]] = {} if waifu["type"] in ["Waifu", "Husbando"]:
for value in waifu: waifus_dict[waifu["name"]] = {}
store_waifus(waifus_dict, waifu, value) for value in waifu:
else: store_waifus(waifus_dict, waifu, value)
break 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) bot = ctx.guild.get_member(self.bot.user.id)

Loading…
Cancel
Save