mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
fix !imdb
This commit is contained in:
parent
1763c76d69
commit
d06345dbe2
2
red.py
2
red.py
@ -984,7 +984,7 @@ async def imdb(message): # Method added by BananaWaffles.
|
|||||||
try:
|
try:
|
||||||
msg.remove(msg[0])
|
msg.remove(msg[0])
|
||||||
msg = "+".join(msg)
|
msg = "+".join(msg)
|
||||||
search = "http://api.myapifilms.com/imdb/title?format=json&title=" + msg + "&token=" + "yourtokenhere"
|
search = "http://api.myapifilms.com/imdb/title?format=json&title=" + msg + "&token=" + apis["MYAPIFILMS_TOKEN"]
|
||||||
async with aiohttp.get(search) as r:
|
async with aiohttp.get(search) as r:
|
||||||
result = await r.json()
|
result = await r.json()
|
||||||
title = result['data']['movies'][0]['title']
|
title = result['data']['movies'][0]['title']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user