diff --git a/server/events/announceManualWatchparty.ts b/server/events/announceManualWatchparty.ts index acaccf6..b4f38ab 100644 --- a/server/events/announceManualWatchparty.ts +++ b/server/events/announceManualWatchparty.ts @@ -32,7 +32,11 @@ export async function execute(event: GuildScheduledEvent) { return } - const message = `[Watchparty] https://discord.com/events/${event.guildId}/${event.id} \nHey <@&${config.bot.announcement_role}>, wir gucken ${event.name} ${createDateStringFromEvent(event, guildId, requestId)}` + if (!event.scheduledStartAt) { + logger.error('Event has no start date, bailing out') + return + } + const message = `[Watchparty] https://discord.com/events/${event.guildId}/${event.id} \nHey <@&${config.bot.announcement_role}>, wir gucken ${event.name} ${createDateStringFromEvent(event.scheduledStartAt, guildId, requestId)}` channel.send(message) } else {