T
T
TheFlamer2021-07-27 21:41:57
Python
TheFlamer, 2021-07-27 21:41:57

How to edit message in on_raw_reaction_add [DISCORD.PY]?

I want to do something that when you click on the reaction, the message changes
My attempts:

@bot.event
async def on_raw_reaction_add(payload):
    stytusid = await payload.fetch_message(869649761689559060)
    await stytusid.edit("TEXT")

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sasha Filinsky, 2021-07-28
@TheFlamer

@bot.event
async def on_raw_reaction_add(payload):
    channel= client.get_channel(payload.channel_id)
    stytusid = await channel.fetch_message(869649761689559060)
    await stytusid.edit(content = "TEXT")

The message must be in the same channel where you put the reaction

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question