Reputation: 13
here is an example: someone send message that name A
and someone is reply to A
. (this message is B
)
how can I get A
from B
?
does message
have reply
variable?
I'm useing discord.py and python.
Upvotes: 0
Views: 205
Reputation: 7303
Use attribute reference
The message that this message references. This is only applicable to messages of type MessageType.pins_add, crossposted messages created by a followed channel integration, or message replies.
message.reference
and it returns the message reference A
from B
where message
is B
. After that, you can get the message using cached_message
or use client.get_guild().get_channel().fetch_message(id)
stuff to get the message object.
Upvotes: 3