F
F
ferrson2020-08-17 16:17:10
Python
ferrson, 2020-08-17 16:17:10

How to update a message in discord.py?

I have a command that creates a message with reactions. After some time, the bot should read all the reactions. That is:
I send a message. After that, I add reactions to the same message and try to count them after a while. I was prompted that I need to update the link to the message, but I could not find how to do it. (If that is done in command and not in on_message and others).
mess = await ctx.send(embed=emb)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Nevzorov, 2020-08-17
@Proffs

discord.message.edit

from asyncio import sleep
@commands.command()
async def test(self, ctx):
    embed = discord.Embed(title="No")
    msg = await ctx.send(embed=embed)
    embed.description = "Well, actually, yes"
    await sleep(5)
    await msg.edit(embed=embed)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question