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
2 changed files with 12 additions and 6 deletions

View file

@ -54,11 +54,11 @@ steps:
- yarn install --frozen-lockfile - yarn install --frozen-lockfile
- yarn build - yarn build
- name: test # - name: test
image: node # image: node
commands: # commands:
- yarn install --frozen-lockfile # - yarn install --frozen-lockfile
- yarn test # - yarn test
trigger: trigger:
branch: branch:

View file

@ -118,7 +118,13 @@ export default class Config extends Command {
if (setting) { if (setting) {
await interaction.reply(`\`${key.value}\`: \`${setting.Value}\``); await interaction.reply(`\`${key.value}\`: \`${setting.Value}\``);
} else { } else {
await interaction.reply(`\`${key.value}\`: \`${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>`);
}
} }
} }