Create store for helper classes to access them through the container for hmr to reload it?

Hello there, I do play with the HMR plugin right now and I noticed with some research that only pieces are getting reloaded on change (as intended). So I searched for a way to add my helper classes to the client container as pieces so they get reloaded aswell. So far I do think that I need to put my helper classes in a store and put them into this store but I didn't found anything related to register a store so maybe you smart guys can help me out by explaining or providing any source of tutorial for me how to do so 🙂 Greetings <:pray_FF:836624926164516875>
2 Replies
Favna
Favna•2y ago
You're trying to use the HMR plugin for purposes it wasn't really meant for... But if you insist, you can create stores the same way sapphire does in various places. For example check the source code of: - plugin-api - plugin-pattern-commands - plugin-scheduled-tasks
ShowCast
ShowCast•2y ago
Since I posted the thread I tried it already like you mentioned. I failed at the point where I need to register the store. I created it and registered it on the sapphire client but the store wasn't loaded properly. Is it enought to just register it or do I need to call the registerPath() method aswell?
Want results from more Discord servers?
Add your server