syntax fix for other python versions

This commit is contained in:
2021-06-13 14:01:23 +02:00
parent 4f0b7d7ef4
commit 5facd8b5a5
2 changed files with 4 additions and 4 deletions

View File

@@ -20,8 +20,8 @@ client = discord.Client()
e = discord.Embed()
# setup gspread
scope = ['https://www.googleapis.com/auth/spreadsheets', 'https://www.googleapis.com/auth/drive']
creds = ServiceAccountCredentials.from_json_keyfile_name('jeevesbot/secret.json', scope)
gclient = gspread.authorize(creds)
# creds = ServiceAccountCredentials.from_json_keyfile_name('jeevesbot/secret.json', scope)
# gclient = gspread.authorize(creds)
@client.event
async def on_message(message):
@@ -41,7 +41,7 @@ async def on_message(message):
channel = functions.checkchannel(message.channel.id)
embed_url = message.content
follow_url = embed_url + '.gif'
full_url = asyncio.run(functions.resolve(follow_url))
full_url = await functions.resolve(follow_url)
gif_url = full_url.split('?')[0]
embed = e.set_image(url=gif_url)
if channel is True: