fix: 🐛 fix a rare crash on EVENTS_CACHE
This commit is contained in:
parent
38ed428d8a
commit
2b046afec8
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user