I am new to making discord bots with Discord.py Is there any way to get the message characters of a message that someone replied to? As in, read the message that someone replied to; not the actual message of the reply.

I am new to making discord bots with Discord.py Is there any way to get the message characters of a message that someone replied to? As in, read the message that someone replied to; not the actual message of the reply.

Copyright © 2021 Jogjafile Inc.
Yes you can. For this, you'll have to use Message.reference to get the
discord.Messageobject of the message you replied to.In this case, you would have to use
ctx.message.referencewhich returns adiscord.MessageReferenceobject.using the
message_idattribute you can get the id from the message you replied to.You would have to use
await ctx.channel.fetch_message(ctx.message.reference.message_id)to get a fulldiscord.Messageobject, which has attributecontentFull code would look like this:
Here's the result:
