From d3670de641eb9399167c1e5863b40866a08b8612 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 27 Jul 2022 16:16:00 +0200 Subject: [PATCH] better handle of options --- src/commands/misc/help.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/commands/misc/help.ts b/src/commands/misc/help.ts index 9857813..335dc7c 100644 --- a/src/commands/misc/help.ts +++ b/src/commands/misc/help.ts @@ -33,12 +33,10 @@ export default { interaction: async (interaction: CommandInteraction, client: Client) => { const loc = getLocale(client, interaction.locale); - const desired_command = ( - interaction.options as CommandInteractionOptionResolver - ).getString(client + const desired_command = interaction.options.get(client .locales .get(client.config.default_lang) - ?.get(`c_${getFilename(__filename)}_opt1_name`) ?? ''); + ?.get(`c_${getFilename(__filename)}_opt1_name`) ?? '')?.value as string; // If a command isn't specified if (!desired_command) {