Fix invalid config value not showing properly #336

Merged
Vylpes merged 5 commits from feature/315-config-value-undefined into develop 2023-09-29 18:00:29 +01:00
Showing only changes of commit fa4236d8a1 - Show all commits

View file

@ -118,7 +118,13 @@ export default class Config extends Command {
if (setting) {
await interaction.reply(`\`${key}\`: \`${setting.Value}\``);
} else {
await interaction.reply(`\`${key}\`: \`${DefaultValues.GetValue(key.value.toString())}\` <DEFAULT>`);
var defaultValue = DefaultValues.GetValue(key.value.toString());
if (defaultValue) {
await interaction.reply(`\`${key}\`: \`${defaultValue}\` <DEFAULT>`);
} else {
await interaction.reply(`\`${key}\`: <NONE>`);
}
}
}