Fix wrong test on filtering user
This commit is contained in:
parent
f7779ace60
commit
96ac519fde
@ -303,10 +303,10 @@ async def ical(entity_id: str):
|
|||||||
for guild in client.guilds:
|
for guild in client.guilds:
|
||||||
if await guild.get_or_fetch_member(int(entity_id)):
|
if await guild.get_or_fetch_member(int(entity_id)):
|
||||||
for scheduled_event in guild.scheduled_events:
|
for scheduled_event in guild.scheduled_events:
|
||||||
if user.id in [
|
if any(
|
||||||
member.id
|
user.id == member.id
|
||||||
for member in await scheduled_event.fetch_users().flatten()
|
for member in await scheduled_event.fetch_users().flatten()
|
||||||
]:
|
):
|
||||||
event = make_event(scheduled_event)
|
event = make_event(scheduled_event)
|
||||||
calendar.events.append(event)
|
calendar.events.append(event)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user