diff --git a/src/main/kotlin/me/duncte123/io/commands/ReloadCommand.kt b/src/main/kotlin/me/duncte123/io/commands/ReloadCommand.kt index 1f05a05..5b31870 100644 --- a/src/main/kotlin/me/duncte123/io/commands/ReloadCommand.kt +++ b/src/main/kotlin/me/duncte123/io/commands/ReloadCommand.kt @@ -7,11 +7,18 @@ import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEve import net.dv8tion.jda.api.interactions.commands.DefaultMemberPermissions import net.dv8tion.jda.api.interactions.commands.build.CommandData +const val DUNSTE_ID = 311769499995209728L + class ReloadCommand : ICommand { override val name = "reload" override val description = "Reloads all user commands" override fun execute(event: SlashCommandInteractionEvent) { + if (event.user.idLong != DUNSTE_ID) { + event.reply("This action is restricted to bot admins only").queue() + return + } + commandManager.resetCommands() commandManager.registerUserCommands() commandManager.registerCommandsOnJda(event.jda)