handle nonexistent users in can_view
This commit is contained in:
parent
b3b7f69788
commit
8d2694d8b7
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue