We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa6ad63 commit 2400cebCopy full SHA for 2400ceb
cogs/modmail.py
@@ -696,9 +696,15 @@ async def sfw(self, ctx):
696
@checks.thread_only()
697
async def msglink(self, ctx, message_id: int):
698
"""Retrieves the link to a message in the current thread."""
699
- try:
700
- message = await ctx.thread.recipient.fetch_message(message_id)
701
- except discord.NotFound:
+ found = False
+ for recipient in ctx.thread.recipients:
+ try:
702
+ message = await recipient.fetch_message(message_id)
703
+ found = True
704
+ break
705
+ except discord.NotFound:
706
+ continue
707
+ if not found:
708
embed = discord.Embed(
709
color=self.bot.error_color, description="Message not found or no longer exists."
710
)
0 commit comments