Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions cogs/modmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,9 +696,15 @@ async def sfw(self, ctx):
@checks.thread_only()
async def msglink(self, ctx, message_id: int):
"""Retrieves the link to a message in the current thread."""
try:
message = await ctx.thread.recipient.fetch_message(message_id)
except discord.NotFound:
found = False
for recipient in ctx.thread.recipients:
try:
message = await recipient.fetch_message(message_id)
found = True
break
except discord.NotFound:
continue
if not found:
embed = discord.Embed(
color=self.bot.error_color, description="Message not found or no longer exists."
)
Expand Down