I'm trying to get my basic discord bot to display a GIF using python as if a user was sending it from tenor.
I.E: example gif
I managed to get my bot to send a gif file that can be opened and viewed but I want to take it a step further and have it show the gif in chat.
Example
import discord
import io
import aiohttp
client = discord.Client()
@client.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.content == 'hello':
embed = discord.Embed(title="Title", description="Desc", color=0x00ff00) #creates embed
file = discord.File("toodamnbad.gif", filename="image.png")
embed.set_image(url="attachment://image.png")
await message.channel.send(file=file)
client.run('TOKEN')