From 96ac519fdecd371e19ab9b3bd2f9e6736016d4e1 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Tue, 7 Nov 2023 02:37:08 +0100 Subject: [PATCH] Fix wrong test on filtering user --- divent/bot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/divent/bot.py b/divent/bot.py index 90fc49b..6492894 100644 --- a/divent/bot.py +++ b/divent/bot.py @@ -303,10 +303,10 @@ async def ical(entity_id: str): for guild in client.guilds: if await guild.get_or_fetch_member(int(entity_id)): for scheduled_event in guild.scheduled_events: - if user.id in [ - member.id + if any( + user.id == member.id for member in await scheduled_event.fetch_users().flatten() - ]: + ): event = make_event(scheduled_event) calendar.events.append(event)