diff --git a/divent/bot.py b/divent/bot.py index 834e6ac..00e018f 100644 --- a/divent/bot.py +++ b/divent/bot.py @@ -332,7 +332,10 @@ async def ical(entity_id: str): for guild in client.guilds: for scheduled_event in guild.scheduled_events: - if user.id in EVENTS_CACHE[scheduled_event.id]: + if ( + scheduled_event.id in EVENTS_CACHE + and user.id in EVENTS_CACHE[scheduled_event.id] + ): event = make_event(scheduled_event) calendar.events.append(event)