From 1c4fdd05f1dd24c4449f1a6b8e32ff337e45f51e Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Fri, 18 Aug 2023 21:04:06 +0100 Subject: [PATCH] Fix config get command not returning the right key value name (#334) # Description - Fixed the `/config get` command not returning the actual key's name, instead using a strinified "Object" property #289 ## Type of change Please delete options that are not relevant. - [x] Bug fix (non-breaking change which fixes an issue) # How Has This Been Tested? - This was tested by running the `/config get` command on my dev bot, and making sure it still gets the correct value for the key string # Checklist - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that provide my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [x] Any dependent changes have been merged and published in downstream modules Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/334 Co-authored-by: Ethan Lane Co-committed-by: Ethan Lane --- src/commands/config.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/config.ts b/src/commands/config.ts index d86c7e3..a456638 100644 --- a/src/commands/config.ts +++ b/src/commands/config.ts @@ -116,9 +116,9 @@ export default class Config extends Command { const setting = server.Settings.filter(x => x.Key == key.value)[0]; if (setting) { - await interaction.reply(`\`${key}\`: \`${setting.Value}\``); + await interaction.reply(`\`${key.value}\`: \`${setting.Value}\``); } else { - await interaction.reply(`\`${key}\`: \`${DefaultValues.GetValue(key.value.toString())}\` `); + await interaction.reply(`\`${key.value}\`: \`${DefaultValues.GetValue(key.value.toString())}\` `); } } @@ -191,4 +191,4 @@ export default class Config extends Command { await interaction.reply('Setting has been set.'); } -} \ No newline at end of file +}