use 'null' instead of empty strings

This commit is contained in:
Jill 2023-11-13 20:11:11 +03:00
parent db7b52d66e
commit b0ea73febc
Signed by: oat
GPG Key ID: 33489AA58A955108
1 changed files with 4 additions and 4 deletions

View File

@ -167,11 +167,11 @@ export const counterConfigs = new Map([
}],
['messageTemplateIncrease', {
type: ConfigType.String,
default: ''
default: 'null'
}],
['messageTemplateDecrease', {
type: ConfigType.String,
default: ''
default: 'null'
}],
// these ones are fake and are just stand-ins for values defined inside the actual counters table
@ -214,9 +214,9 @@ export async function announceCounterUpdate(bot: Client, member: GuildMember, de
let template = await getCounterConfig(counter.id, 'messageTemplate') as string;
const templateIncrease = await getCounterConfig(counter.id, 'messageTemplateIncrease') as string;
if (templateIncrease !== '' && delta > 0) template = templateIncrease;
if (templateIncrease !== 'null' && delta > 0) template = templateIncrease;
const templateDecrease = await getCounterConfig(counter.id, 'messageTemplateDecrease') as string;
if (templateDecrease !== '' && delta < 0) template = templateDecrease;
if (templateDecrease !== 'null' && delta < 0) template = templateDecrease;
const anonymous = await getCounterConfig(counter.id, 'anonymous') as boolean;