fix: setting command bug

This commit is contained in:
2024-08-07 16:49:47 +03:00
parent f04407ee3d
commit d03dec9733

View File

@@ -48,12 +48,12 @@ export default command({
if (value == null) {
const value = await getSetting(key)
return message.reply(`\`${key}\` is set to \`${value}\``)
return message.reply(`\`${key}\` is set to \`${JSON.stringify(value)}\``)
}
if (!force) {
const exists = await getSetting(key)
if (!exists) {
if (exists === undefined) {
return message.reply(`Key \`${key}\` does not exist. Use \`-f\` to force setting this key`)
}
}