New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: reloading the entire command store didn't fire ApplicationCommandRegistries #525
Conversation
@sapphiredev pack |
Hey @favna, I've released this to NPM. You can install it for testing like so: npm install @sapphire/framework@pr-525 |
@sapphiredev pack |
Heya @vladfrangu, I've started to run the deployment workflow on this PR at 0d23cd1. You can monitor the build here! |
Hey @vladfrangu, The bot has released this to NPM. You can install it for testing like so: npm install @sapphire/framework@pr-525 |
…dRegistries (sapphiredev#525) * fix: reloading the entire command store didn't fire ApplicationCommandRegistries * chore: smol fix * chore: add note on current unload behavior for future changes Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Sorry for the necro-bump, but the npm package for the sapphire framework still has the https://www.npmjs.com/package/@sapphire/framework?activeTab=versions |
Apparently CI failed for this PR, thanks NPM API for being unpredictable af. https://github.com/sapphiredev/framework/actions/runs/3169108831 Just deprecated it manually. Thanks for informing. |
CommandStore#loadAll()
indirectly removes all application command registries. In addition, the Command'sapplicationCommandRegistry
being readonly snapshots the command's old registry before it is removed.As a result, application command registries won't handle api calls after reloading the command store more than once.
This is a hacky patch that gets the job done, so draft pr is only for visibility in hopes of reaching a better solution.