Skip to content

Commit

Permalink
chore: code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkAtra committed Nov 5, 2024
1 parent 49774f7 commit 253c375
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/de/darkatra/vrising/discord/Bot.kt
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ class Bot(

// delete obsolete commands
currentGlobalApplicationCommands
.filterNot { discordCommand -> commands.any { command -> command.getCommandName() == discordCommand.name } }
.filterNot { applicationCommand -> commands.any { command -> command.getCommandName() == applicationCommand.name } }
.forEach { applicationCommand ->
applicationCommand.delete()
logger.info("Successfully deleted obsolete '${applicationCommand.name}' command.")
}

// register commands that aren't registered yet
commands
.filterNot { command -> currentGlobalApplicationCommands.any { discordCommand -> command.getCommandName() == discordCommand.name } }
.filterNot { command -> currentGlobalApplicationCommands.any { applicationCommand -> command.getCommandName() == applicationCommand.name } }
.forEach { command ->
command.register(kord)
logger.info("Successfully registered '${command.getCommandName()}' command.")
Expand Down

0 comments on commit 253c375

Please sign in to comment.