diff --git a/src/api/Commands/commandHelpers.ts b/src/api/Commands/commandHelpers.ts index 4ae022c5..ac1dafc9 100644 --- a/src/api/Commands/commandHelpers.ts +++ b/src/api/Commands/commandHelpers.ts @@ -54,5 +54,5 @@ export function sendBotMessage(channelId: string, message: PartialDeep) export function findOption(args: Argument[], name: string): T & {} | undefined; export function findOption(args: Argument[], name: string, fallbackValue: T): T & {}; export function findOption(args: Argument[], name: string, fallbackValue?: any) { - return (args.find(a => a.name === name)?.value || fallbackValue) as any; + return (args.find(a => a.name === name)?.value ?? fallbackValue) as any; }