Closed CompuGenius-Programs closed 5 years ago
https://discordpy.readthedocs.io/en/latest/api.html#discord.Message.embeds https://discordpy.readthedocs.io/en/latest/api.html#discord.Embed.description
For future questions like this, you should join either the official discord.py server or the Discord API server for help, as the README recommends.
@Harmon758 thanks for replying so quickly! These references are for getting the description, and not for merely creating them? Sure I'll join the server!
You can create Embed
objects to send, as well as get their dictionary form from Message
objects by using Message.embeds
.
@Harmon758 how do I get there description? What does message.embeds print out? A list?
If you read the documentation, you would know.
I also just saw you on the Discord.py server. That's where these sorts of questions belong.
I know I was on the server, but they told me to check what you responded.
@Harmon758 in sorry man, but I'm still confused! Can you please send me sample code that will repost what the descriptions of the embed is? I'm really sorry that in driving you nuts!
As the documentation I linked to says, Message.embeds
returns a list of embedded objects. These are dictionaries with the data from the Embeds
. You can access the dictionary to get the description.
On the rewrite branch, Message.embeds
will give you a list of Embed
objects, with which you can get the description using the Embed.description
attribute.
For further help, you should inquire on Discord. However, asking for code for what you want, instead of learning to write it yourself, is generally frowned upon.
Thanks so much!!!!!!!
You probably shouldn’t reopen older issues, also for help with the library join the support server (link is in the README)
Hi @Rapptz! I have this bot that assigns a mentioned user a certain role. I would like it that the bot doesn't only give the role to users mentioned in regular text, but in embeds as well. For example, let's say another bot mentions a user in a embed as a promotion. I want this bot to get the text from the embed, and use it the same way as if it got the text from a normal user's message. Thanks in advance! My bot: https://github.com/CompuGenius-Programs/moderator-for-a-day/blob/master/addroles.py