Skip to content

Commit 2efd4a5

Browse files
committed
Fix logs command without argument in thread channel when the recipient is not cached.
1 parent 80010ca commit 2efd4a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cogs/modmail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ async def logs(self, ctx, *, user: User = None):
680680
thread = ctx.thread
681681
if not thread:
682682
raise commands.MissingRequiredArgument(SimpleNamespace(name="member"))
683-
user = thread.recipient
683+
user = thread.recipient or await self.bot.fetch_user(thread.id)
684684

685685
default_avatar = "https://cdn.discordapp.com/embed/avatars/0.png"
686686
icon_url = getattr(user, "avatar_url", default_avatar)

0 commit comments

Comments
 (0)