Uploading a file in a embed discord.py (not a image)

2024/11/20 7:25:05

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

Answer

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)
https://en.xdnf.cn/q/119856.html

Related Q&A

Cannot install psycopg2 on virtualenv

Hi I use manjaro Linux and I tryed to install psycopg2 packge inside virtualenv but it gave errror error: command gcc failed with exit status 1. Then in the console I tryed gcc --version it saidbash: …

how to execute different print function based on the users input

I am a complete beginner to coding and python so It is probably very simple. So my problem is that am learning how to put if and else function based on the users input and i dont know how to connect be…

matplotlib - AttributeError: module numbers has no attribute Integral

I am a newbie to python and i am trying to learn online. I tried importing matplotlib on python 3.6 but i keep getting this error:problem in matplotlib - AttributeError: module numbers has no attribute…

How to extract social information from a given website?

I have a Website URL Like www.example.comI want to collect social information from this website like : facebook url (facebook.com/example ), twitter url ( twitter.com/example ) etc., if available anywh…

Check if string is of nine digits then exit function in python

I have a function in python that returns different output of strings (Text). And I have different parts that I should check for the string and if the string is of nine digits or contains 9 digits then …

How to extract quotations from text using NLTK [duplicate]

This question already has answers here:RegEx: Grabbing values between quotation marks(20 answers)Closed 8 years ago.I have a project wherein I need to extract quotations from a huge set of articles . H…

takes exactly 2 arguments (1 given) when including self [closed]

Its difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying thi…

scipy.optimize.curve_fit a definite integral function with scipy.integrate.quad

If I have a function that the independent variable is the upper limit of an definite integral of a mathematical model. This mathematical model has the parameters I want to do regression. This mathemati…

MAC OS - os.system(command) display nothing

When I run IDLE (python 3.8) :>>> import os >>> os.system("ls") 0 >>> os.system(echo "test") 0 >>> os.system("users") 0 >>> Bu…

Flask App will not load app.py (The file/path provided (app) does not appear to exist)

My flask app is outputting no content for the for() block and i dont know why.I tested my query in app.py , here is app.py:# mysql config app.config[MYSQL_DATABASE_USER] = user app.config[MYSQL_DATABAS…