Fix disabling a single command causing all commands to be disabled

This commit is contained in:
Josh Roy 2021-07-04 15:42:05 -04:00
parent d244956b4b
commit 0a0416ae38
1 changed files with 7 additions and 1 deletions

View File

@ -160,12 +160,18 @@ public class JDADiscordService implements DiscordService {
}
interactionController = new InteractionControllerImpl(this);
// Each will throw an exception if disabled
try {
interactionController.registerCommand(new ExecuteCommand(this));
} catch (InteractionException ignored) {
}
try {
interactionController.registerCommand(new MessageCommand(this));
} catch (InteractionException ignored) {
}
try {
interactionController.registerCommand(new ListCommand(this));
} catch (InteractionException ignored) {
// won't happen
}
updatePrimaryChannel();