mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 19:28:54 -05:00
Have to fix some stuff before making !imdb available
This commit is contained in:
parent
7cef720350
commit
0862681078
7
red.py
7
red.py
@ -201,8 +201,9 @@ async def on_message(message):
|
|||||||
pass
|
pass
|
||||||
elif message.content.startswith('!gif'):
|
elif message.content.startswith('!gif'):
|
||||||
await gif(message)
|
await gif(message)
|
||||||
elif message.content.startswith('!imdb'):
|
elif message.content.startswith('!imdb'):
|
||||||
await imdb(message)
|
#await imdb(message)
|
||||||
|
await client.send_message(message.channel, "`!imdb will be available soon.`")
|
||||||
elif message.content.startswith('!urban'):
|
elif message.content.startswith('!urban'):
|
||||||
await urban(message)
|
await urban(message)
|
||||||
elif message.content.startswith('!uptime'):
|
elif message.content.startswith('!uptime'):
|
||||||
@ -919,7 +920,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=" + "yourtokenhere"
|
||||||
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