-2

I'm trying to upload a file directly in a embed, I can upload the file but I don't find the way to put it in the embed. What I want is not displaying the file but uploading it so we can download it, is it possible in a embed? Thanks

I can attach a file to a embed but it don't put it in the embed, it just send it at the same time

2 Answers2

1

Problem solved, you can't do it, here is a other way and more compact.

@client.command()
async def file(ctx, arg):
    file = discord.File(arg)
    embed = discord.Embed(title='Title', description='a description', color=0xfce303)
    await ctx.send(embed=embed, file=file)
0

if you want to put the file in an embed, that is not possible, discord themselves haven't allowed for that. You can send a file and a message at the same time. Here's how:

@client.command()
async def name(ctx):
    embed = discord.Embed(colour=0x00000)
    embed.title = f"your title"
    embed.description = f"your desc"
    await ctx.send(embed=embed)
    await ctx.file.send("filename.txt")