Sapphire's approach to components
Does sapphire introduce a new way to handle component interaction? Non persistent components, If so what are they
Solution:Jump to solution
If you mean a scenario where the bot would reply with a component and then listen to that, I'd recommend either:
1. If something simple like a Yes/No button, just use
message.awaitMessageComponentInteraction
2. If inputs result in completely separate functionality like Singleplayer vs Multiplayer, stringify all necessary state and add it to the custom ID, then parse it out in separate interaction handlers...4 Replies
Solution
If you mean a scenario where the bot would reply with a component and then listen to that, I'd recommend either:
1. If something simple like a Yes/No button, just use
message.awaitMessageComponentInteraction
2. If inputs result in completely separate functionality like Singleplayer vs Multiplayer, stringify all necessary state and add it to the custom ID, then parse it out in separate interaction handlersHmm i see
Or you can just use interaction handlers: https://www.sapphirejs.dev/docs/Guide/interaction-handlers/what-are-they ?
Sapphire Framework
What are they? | Sapphire
These are interaction handlers! A simple class you can extend to handle almost all the interactions you may receive in
(#2