aboutsummaryrefslogtreecommitdiff
path: root/pindelegate
diff options
context:
space:
mode:
authorArjun Satarkar <me@arjunsatarkar.net>2023-12-21 11:28:25 +0000
committerArjun Satarkar <me@arjunsatarkar.net>2023-12-21 11:28:25 +0000
commitd9751132c69a286a86811d0fad1932176387fe7a (patch)
treecc18a4b942bf52a6d9826ebf0da2dcd96b34ce7d /pindelegate
parentdb64a76603bb13b7f4ada0ca3982e47813fda9ab (diff)
downloadaps-cogs-d9751132c69a286a86811d0fad1932176387fe7a.tar
aps-cogs-d9751132c69a286a86811d0fad1932176387fe7a.tar.gz
aps-cogs-d9751132c69a286a86811d0fad1932176387fe7a.zip
pindelegate: add docstrings
Diffstat (limited to 'pindelegate')
-rw-r--r--pindelegate/pindelegate.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/pindelegate/pindelegate.py b/pindelegate/pindelegate.py
index 2b94bf4..6e23304 100644
--- a/pindelegate/pindelegate.py
+++ b/pindelegate/pindelegate.py
@@ -15,6 +15,9 @@ class PinDelegate(commands.Cog):
@commands.command()
@checks.admin_or_permissions(administrator=True)
async def pindelegate(self, ctx, user: discord.Member):
+ """
+ Grant a user the ability to pin messages in this channel with the pin command.
+ """
async with self.config.channel(
ctx.channel
).pin_capable_members() as pin_capable_members:
@@ -26,6 +29,9 @@ class PinDelegate(commands.Cog):
@commands.command()
@checks.admin_or_permissions(administrator=True)
async def pinundelegate(self, ctx, user: discord.Member):
+ """
+ Remove a user's ability to pin messages in this channel.
+ """
async with self.config.channel(
ctx.channel
).pin_capable_members() as pin_capable_members:
@@ -51,11 +57,17 @@ class PinDelegate(commands.Cog):
@commands.command()
async def pin(self, ctx):
+ """
+ Pin the replied-to message.
+ """
if await self.is_pin_capable(ctx.channel, ctx.author.id):
await ctx.message.reference.resolved.pin()
@commands.command()
async def unpin(self, ctx):
+ """
+ Unpin the replied-to message.
+ """
replied_to_message = ctx.message.reference.resolved
if await self.is_pin_capable(ctx.channel, ctx.author.id):
if replied_to_message.pinned: