From c0d48a92dc5c11297ad81d1ea417e6d942cd1336 Mon Sep 17 00:00:00 2001 From: James Shiffer Date: Wed, 31 Jul 2024 04:46:43 +0000 Subject: [PATCH] Fix bug where unauthorized users could change llmconf lol --- discord/commands/config/config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/discord/commands/config/config.ts b/discord/commands/config/config.ts index 7719bd6..d258008 100644 --- a/discord/commands/config/config.ts +++ b/discord/commands/config/config.ts @@ -18,6 +18,7 @@ async function configCommand(interaction: ChatInputCommandInteraction) { if (interaction.user.id !== process.env.ADMIN) { await interaction.reply("You are not authorized to change model settings"); + return; } config.llmSettings.max_new_tokens = interaction.options.getInteger('max_new_tokens') ?? config.llmSettings.max_new_tokens;