From 8d2694d8b77789e730e46235148acbd5e1cf6a44 Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Fri, 21 Feb 2025 16:20:17 -0500 Subject: [PATCH] handle nonexistent users in can_view --- nomen/notifications.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nomen/notifications.py b/nomen/notifications.py index 170967d..4f1d756 100644 --- a/nomen/notifications.py +++ b/nomen/notifications.py @@ -42,6 +42,10 @@ async def in_thread(member, thread): async def can_view(ctx, member) -> bool: + # Nonexistent members cannot view + if member is None: + return False + if ctx.channel.type == ChannelType.private_thread and not await in_thread(member, ctx.channel): return False