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):
693693 sent_emoji , _ = await self .bot .retrieve_emoji ()
694694 await self .bot .add_reaction (ctx .message , sent_emoji )
695695
696- @commands .command ()
696+ @commands .command (name = "msglink" , aliases = [ "messagelink" ] )
697697 @checks .has_permissions (PermissionLevel .SUPPORTER )
698698 @checks .thread_only ()
699699 async def msglink (self , ctx , message_id : int ):
700700 """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 :
704710 embed = discord .Embed (
705711 color = self .bot .error_color , description = "Message not found or no longer exists."
706712 )
You can’t perform that action at this time.
0 commit comments