Detect HMR Reload

Hey! Is there any way to detect when HMR https://www.npmjs.com/package/@sapphire/plugin-hmr has run on my code? I need to refresh some stale data when it runs Thanks!
npm
@sapphire/plugin-hmr
Plugin for @sapphire/framework for hot module reloading for pieces. Latest version: 2.0.0, last published: 3 months ago. Start using @sapphire/plugin-hmr in your project by running npm i @sapphire/plugin-hmr. There are no other projects in the npm registry using @sapphire/plugin-hmr.
Solution:
We currently do not emit any events back to sapphire on reloads but a PR for that would be accepted.
Jump to solution
5 Replies
Rhys
Rhys2y ago
Link to the repository also just to help provide additional context incase it's needed https://github.com/AnswerOverflow/AnswerOverflow/tree/Turbo-Repo-Base
GitHub
GitHub - AnswerOverflow/AnswerOverflow at Turbo-Repo-Base
Contribute to AnswerOverflow/AnswerOverflow development by creating an account on GitHub.
Sawako
Sawako2y ago
Btw Since you are the owner of the bot It would be great about the consent of the users' messages, on the web only their names and avatars would be hidden, but not the content of the message I say that because a lot of context is lost since even the content of the message is hidden
Rhys
Rhys2y ago
Yeah that’s a bit of a tricky once since discords ToS is pretty restrictive on how you handle user data - Answer Overflow is made currently to follow that as closely as possible once it grows a bit and I’ve got more of communication channel w/ discord people I’ll see what I can do
Solution
Favna
Favna2y ago
We currently do not emit any events back to sapphire on reloads but a PR for that would be accepted.
Rhys
Rhys2y ago
Good to know thanks! I'll take a look into making a PR
Want results from more Discord servers?
Add your server
More Posts