No point checking for things besides Waifu's and Husbando's

Now including Manga's, Games and Hentai's
pull/9/head
sgoudham 4 years ago
parent f14213ffb8
commit bb333300b1

@ -504,8 +504,6 @@ class Anime(Cog):
# Store all data from the api in dict # Store all data from the api in dict
if len(api_data["data"]) > 0: if len(api_data["data"]) > 0:
for item in api_data["data"]: for item in api_data["data"]:
# Don't bother storing Hentai's or Games (Not yet until I figure out what data they send)
if item["type"] in ["Waifu", "Husbando", "TV", "ONA", "OVA"]:
anime_or_waifu[item["name"]] = {} anime_or_waifu[item["name"]] = {}
for value in item: for value in item:
store_dict(anime_or_waifu, item, value) store_dict(anime_or_waifu, item, value)
@ -513,6 +511,7 @@ class Anime(Cog):
# When no waifu has been retrieved, send error message to the user # When no waifu has been retrieved, send error message to the user
else: else:
await self.bot.generate_embed(ctx, desc="**Waifu/Anime Not Found!**") await self.bot.generate_embed(ctx, desc="**Waifu/Anime Not Found!**")
return
# Get the instance of the bot # Get the instance of the bot
bot = ctx.guild.get_member(self.bot.user.id) bot = ctx.guild.get_member(self.bot.user.id)

@ -41,7 +41,7 @@ def search(self, bot):
if key["type"] in ["Waifu", "Husbando"]: if key["type"] in ["Waifu", "Husbando"]:
embed.set_footer(text=f"❤️ {key['likes']} 🗑️ {key['trash']} | Powered by MyWaifuList") embed.set_footer(text=f"❤️ {key['likes']} 🗑️ {key['trash']} | Powered by MyWaifuList")
elif key["type"] in ["TV", "ONA", "OVA"]: else:
if key['romaji_name']: if key['romaji_name']:
embed.set_footer(text=f"{key['romaji_name']} | Powered by MyWaifuList") embed.set_footer(text=f"{key['romaji_name']} | Powered by MyWaifuList")
else: else:

Loading…
Cancel
Save