diff options
author | Arjun Satarkar <me@arjunsatarkar.net> | 2023-12-21 12:38:06 +0000 |
---|---|---|
committer | Arjun Satarkar <me@arjunsatarkar.net> | 2023-12-21 12:38:06 +0000 |
commit | cd88508f33c77c3018b0ed74d0813c9e2751bf4d (patch) | |
tree | 279335a890f68d5115c0316f3de76a9ad22757be | |
parent | 244738893f9a933cc681c193ee594811ad89ec5d (diff) | |
download | aps-cogs-cd88508f33c77c3018b0ed74d0813c9e2751bf4d.tar aps-cogs-cd88508f33c77c3018b0ed74d0813c9e2751bf4d.tar.gz aps-cogs-cd88508f33c77c3018b0ed74d0813c9e2751bf4d.zip |
pindelegate: include pinner/unpinner in audit log reason
-rw-r--r-- | pindelegate/pindelegate.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pindelegate/pindelegate.py b/pindelegate/pindelegate.py index 6e23304..3d3b7ea 100644 --- a/pindelegate/pindelegate.py +++ b/pindelegate/pindelegate.py @@ -61,7 +61,7 @@ class PinDelegate(commands.Cog): Pin the replied-to message. """ if await self.is_pin_capable(ctx.channel, ctx.author.id): - await ctx.message.reference.resolved.pin() + await ctx.message.reference.resolved.pin(reason=f"On behalf of {ctx.author.name}") @commands.command() async def unpin(self, ctx): @@ -71,7 +71,7 @@ class PinDelegate(commands.Cog): replied_to_message = ctx.message.reference.resolved if await self.is_pin_capable(ctx.channel, ctx.author.id): if replied_to_message.pinned: - await replied_to_message.unpin() + await replied_to_message.unpin(reason=f"On behalf of {ctx.author.name}") await ctx.reply("Unpinned message!") else: await ctx.reply("That message was already not pinned.") |