itsMapleLeaf / reacord

Create interactive Discord messages using React. ⚛
https://reacord.mapleleaf.dev/
MIT License
754 stars 13 forks source link

Render to existing messages / hydration #7

Open itsMapleLeaf opened 2 years ago

itsMapleLeaf commented 2 years ago

Right now, Reacord can create a new message and render to that, but it cannot take control of an existing message and use that. This is similar in concept to DOM hydration, and could be used to keep previous messages interactive after a bot restart, among other things. What this implementation looks like, I'm not sure yet :thinking:

frixaco commented 2 years ago

Hey, @itsMapleLeaf! May I know what's the status on this?

itsMapleLeaf commented 2 years ago

Hey, my attention has been elsewhere and away from Reacord lately, so this hasn't seen any progress. Always happy to accept PRs though

4lve commented 1 year ago

Maybe add a way to save important message states and load them again. You could also allow the component to take a message and recover the state that way

4lve commented 1 year ago

Anyone else have any suggestions on how this can be done? Maybe like storing it in a database?

tomli380576 commented 11 months ago

For anyone attempting this, note that the <Message>.edit() method in discord.js will fail for messages that have been in a channel for a long time (usually 1.5~2 months). There won't be any errors and the promise will successfully resolve, but the actual message is not updated. I don't know if it's an issue with discord.js or the discord API itself though.