From 253c37556107d019791b4abfe947674ebe43cbe9 Mon Sep 17 00:00:00 2001 From: DarkAtra Date: Tue, 5 Nov 2024 22:46:26 +0100 Subject: [PATCH] chore: code cleanup --- src/main/kotlin/de/darkatra/vrising/discord/Bot.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/de/darkatra/vrising/discord/Bot.kt b/src/main/kotlin/de/darkatra/vrising/discord/Bot.kt index bf03129..683e86c 100644 --- a/src/main/kotlin/de/darkatra/vrising/discord/Bot.kt +++ b/src/main/kotlin/de/darkatra/vrising/discord/Bot.kt @@ -85,7 +85,7 @@ 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.") @@ -93,7 +93,7 @@ class Bot( // 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.")