mirror of
https://github.com/polyjitter/searchbot-discord.git
synced 2024-08-14 22:46:55 +00:00
Fixed manga too
This commit is contained in:
parent
ddb5c1b193
commit
bf8f29aa72
1 changed files with 39 additions and 42 deletions
|
@ -159,8 +159,7 @@ Powered by kitsu.io"""
|
||||||
|
|
||||||
# Handling
|
# Handling
|
||||||
async with ctx.typing():
|
async with ctx.typing():
|
||||||
async with aiohttp.ClientSession() as session:
|
async with self.request.get(base + "manga", params={"filter[text]": query}) as resp:
|
||||||
async with session.get(base + "manga", params={"filter[text]": query}) as resp:
|
|
||||||
|
|
||||||
resp = await resp.json()
|
resp = await resp.json()
|
||||||
resp = resp['data']
|
resp = resp['data']
|
||||||
|
@ -201,7 +200,7 @@ Powered by kitsu.io"""
|
||||||
|
|
||||||
await ctx.send(f"**{title}** - <{url}>", embed=embed)
|
await ctx.send(f"**{title}** - <{url}>", embed=embed)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception :
|
||||||
|
|
||||||
aired = f"{manga['attributes']['startDate']}{thing}"
|
aired = f"{manga['attributes']['startDate']}{thing}"
|
||||||
template = f"""
|
template = f"""
|
||||||
|
@ -218,8 +217,6 @@ Type: {manga['attributes']["showType"]}
|
||||||
Powered by kitsu.io"""
|
Powered by kitsu.io"""
|
||||||
await ctx.send(template)
|
await ctx.send(template)
|
||||||
|
|
||||||
await session.close()
|
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
bot.add_cog(SpecialtySearch(bot))
|
bot.add_cog(SpecialtySearch(bot))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue