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
feat: optionally remove commands that are in the application but not in the commands store #579
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add some logging to this file. Start with adding the following then follow other suggestions for log lines.
private debug(message: string, ...other: unknown[]) {
container.logger.debug(`UnknownApplicationCommandDeletion ${message}`, ...other);
}
07121fa
to
00dfb8c
Compare
fix: add some additional notes, return sooner, and debug logging
@vladfrangu review pls |
This is not how it should be done. This should be a mode which decides if the registries use commands.set instead of commands.create/commands.delete! It also completely ignores the registries, or the ids/names they have inside. |
I actually have no idea what you're referring to and if I don't then @bitomic probably definitely doesn't either. I rather have a feeling that you're missing the point of this option. The point is that every command that doesn't have a matching piece is nuked. And if people using it do not use |
@vladfrangu has veto'd that #577 won't be realized (at least at the current time) in favour of #578. So I'm keeping this PR open for now until @vladfrangu finishes his changes, but don't expect this to be merged. |
closes #577
automaticallyDeleteUnknownCommands
.automaticallyDeleteUnknownCommands
is set to true, it loads an optional listener on theready
event that runs once. Gets what application commands are inclient.application.commands
and filters the names that aren't incontainer.stores.get('commands').keys()
.Before merging: