File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -601,6 +601,18 @@ async def sfw(self, ctx):
601601 sent_emoji , _ = await self .bot .retrieve_emoji ()
602602 await self .bot .add_reaction (ctx .message , sent_emoji )
603603
604+ @commands .command ()
605+ @checks .has_permissions (PermissionLevel .SUPPORTER )
606+ @checks .thread_only ()
607+ async def loglink (self , ctx , message_id : int ):
608+ """Retrieves the link to a message in the current thread."""
609+ message = await ctx .thread .recipient .fetch_message (message_id )
610+ if not message :
611+ embed = discord .Embed (color = self .bot .main_color , description = "Message no longer exists." )
612+ else :
613+ embed = discord .Embed (color = self .bot .main_color , description = message .jump_url )
614+ await ctx .send (embed = embed )
615+
604616 @commands .command ()
605617 @checks .has_permissions (PermissionLevel .SUPPORTER )
606618 @checks .thread_only ()
You can’t perform that action at this time.
0 commit comments