RikSantra
RikSantra

Reputation: 59

Embed images not loading in discord python

My discord bot is supposed to send an imbedded image on a command 'tsun!kill', I'm using the following code:

@commands.command()
    async def kill(self, ctx, member: discord.Member = None):
        if member == None:
            embed = discord.Embed(title= "Kill who?")
            embed.set_image(url="https://tenor.com/view/go-to-sleep-gif-13374919")
            await ctx.send(embed = embed)

Everything works fine, but the image never loads: Screenshot

However if the link is sent using the usual ctx.send() the preview loads perfectly.

Upvotes: 0

Views: 2649

Answers (1)

Finlay
Finlay

Reputation: 311

You need to use the link to the actual image, which is the following:

embed.set_image(url="https://media.tenor.com/images/cb37de2f54039535426738c62136d0e3/tenor.gif")

Upvotes: 1

Related Questions