getting a bot to print the text of a message from its id

You must assign fetched message to a variable. For example message = await channel.fetch_message(payload.message_id). Then you can get it’s content with message.content.

@bot.event
async def on_raw_reaction_add(payload):
    print(payload)
    channel = bot.get_channel(payload.channel_id)
    message = await channel.fetch_message(payload.message_id)
    print(message.content)

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top