This commit is contained in:
Rainnny7 2024-07-04 09:01:56 -04:00
parent 47b4796695
commit ee1b2e0ae0

@ -95,7 +95,7 @@ public class CommandService extends ListenerAdapter {
// Unregister all commands that Discord has but we don't // Unregister all commands that Discord has but we don't
jda.retrieveCommands().complete().forEach(command -> { jda.retrieveCommands().complete().forEach(command -> {
if (commands.containsKey(command.getName()) if (commands.containsKey(command.getName())
|| commands.get(command.getName()).getInfo().isBotOwnerOnly()) { && commands.get(command.getName()).getInfo().isBotOwnerOnly()) {
jda.deleteCommandById(command.getId()).complete(); // Unregister the command on Discord jda.deleteCommandById(command.getId()).complete(); // Unregister the command on Discord
log.info("Unregistered hidden command \"{}\" from Discord", command.getName()); log.info("Unregistered hidden command \"{}\" from Discord", command.getName());
return; return;