Fix config get command not returning the right key value name (#334)
Some checks failed
continuous-integration/drone/push Build is failing

# 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 <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
This commit is contained in:
Ethan Lane 2023-08-18 21:04:06 +01:00 committed by Vylpes
parent 2d48a6fde2
commit 1c4fdd05f1

View file

@ -116,9 +116,9 @@ export default class Config extends Command {
const setting = server.Settings.filter(x => x.Key == key.value)[0]; const setting = server.Settings.filter(x => x.Key == key.value)[0];
if (setting) { if (setting) {
await interaction.reply(`\`${key}\`: \`${setting.Value}\``); await interaction.reply(`\`${key.value}\`: \`${setting.Value}\``);
} else { } else {
await interaction.reply(`\`${key}\`: \`${DefaultValues.GetValue(key.value.toString())}\` <DEFAULT>`); await interaction.reply(`\`${key.value}\`: \`${DefaultValues.GetValue(key.value.toString())}\` <DEFAULT>`);
} }
} }
@ -191,4 +191,4 @@ export default class Config extends Command {
await interaction.reply('Setting has been set.'); await interaction.reply('Setting has been set.');
} }
} }