File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -693,14 +693,20 @@ async def sfw(self, ctx):
693
693
sent_emoji , _ = await self .bot .retrieve_emoji ()
694
694
await self .bot .add_reaction (ctx .message , sent_emoji )
695
695
696
- @commands .command ()
696
+ @commands .command (name = "msglink" , aliases = [ "messagelink" ] )
697
697
@checks .has_permissions (PermissionLevel .SUPPORTER )
698
698
@checks .thread_only ()
699
699
async def msglink (self , ctx , message_id : int ):
700
700
"""Retrieves the link to a message in the current thread."""
701
- try :
702
- message = await ctx .thread .recipient .fetch_message (message_id )
703
- except discord .NotFound :
701
+ found = False
702
+ for recipient in ctx .thread .recipients :
703
+ try :
704
+ message = await recipient .fetch_message (message_id )
705
+ found = True
706
+ break
707
+ except discord .NotFound :
708
+ continue
709
+ if not found :
704
710
embed = discord .Embed (
705
711
color = self .bot .error_color , description = "Message not found or no longer exists."
706
712
)
You can’t perform that action at this time.
0 commit comments