improve message clarity when no start date in event found
All checks were successful
Compile the repository / compile (pull_request) Successful in 4m8s

This commit is contained in:
Sammy 2023-06-23 19:30:17 +02:00
parent 45d87275bf
commit 3a5ea5d4ff

View File

@ -5,7 +5,7 @@ import { logger } from "../logger";
export function createDateStringFromEvent(event: GuildScheduledEvent, requestId: string, guildId?: string): string { export function createDateStringFromEvent(event: GuildScheduledEvent, requestId: string, guildId?: string): string {
if(!event.scheduledStartAt) { if(!event.scheduledStartAt) {
logger.error("Event has no start. Cannot create dateString.", {guildId, requestId}) logger.error("Event has no start. Cannot create dateString.", {guildId, requestId})
return "habe keinen Startzeitpunkt ermitteln können" return `"habe keinen Startzeitpunkt ermitteln können"`
} }
const date = format(event.scheduledStartAt, "dd.MM") const date = format(event.scheduledStartAt, "dd.MM")