Interaction (De)Serialization
I’m in the process of rearchitecting my bot and am migrating over to AWS for my infrastructure. I’m planning on using SQS to process events and then handle them downstream through handlers.
I’ve been looking through the docs and I can’t quite find if this is possible, but does Discord JS allow for serialization/deserialization of interactions?
I know I can convert the interaction to a JSON format with
toJSON()
, but that doesn’t afford me the ability to process interactions later as I would when handing them immediately.
I can utilize the JSON to an extent with some concessions on certain processing aspects and UX degradations, but it would be fantastic if I could just recall the interaction object by its ID and then continue processing as one would normally.7 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
I thought about it, but we all know discord.js is WAY easier to integrate with than discord's default APIs. It may come down to me having to use it though if I can't find an alternative.
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
This would be using discord.js or Discord's APIs? Khafra got me thinking that I should just switch over to running everything off of my HTTP server (which this is already running on anyways)
Ok, let me look into it. Thanks!
Forgive me for recro'ing this old thread, but I was wondering if you managed to implement the solution proposed by Qjuh, as I would like to do much the same as what you described
Yes, that ended up working. I did move away from the implementation to something else, but it did work.