discord-jda / JDA

Java wrapper for the popular chat & VOIP service: Discord https://discord.com
Apache License 2.0
4.28k stars 738 forks source link

Retrieve message content before it's update #471

Closed SadiinsoSnowfall closed 6 years ago

SadiinsoSnowfall commented 6 years ago

Is it possible to retrieve the content of a message before it's update ? For example, a message in a MessageUpdateEvent.

Shengaero commented 6 years ago

Your best bet is cache the content of the message.

SadiinsoSnowfall commented 6 years ago

hum... ok, but I can't save the content of every messages my bot receive...

Kodehawa commented 6 years ago

You don't have to cache all of them. I cache 20k of them and there only are 20k cached messages at any given time, with newer ones replacing the old ones, which is how I think it has to be done, with x amount.

SadiinsoSnowfall commented 6 years ago

Ok, thanks for the idea :D

MinnDevelopment commented 6 years ago

Since discord does not provide this information and JDA is not keeping a cache of received messages this is not supported.