handle nonexistent users in can_view

This commit is contained in:
Infinidoge 2025-02-21 16:20:17 -05:00
parent b3b7f69788
commit 8d2694d8b7
Signed by: Infinidoge
SSH key fingerprint: SHA256:EMoPe5e2dO0gEvtBb2xkZTz5dkyL0rBmuiGTKG5s96E

View file

@ -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