[Permissions] Possible solution for clearing out usage of commands with <who_or_what> (#2992)

* style(permissions): clear out usage of commands with <who_or_what>

* chore(changelog): add towncrier entry

* style(permissions): fix black formatting
This commit is contained in:
jack1142 2019-09-09 21:29:19 +02:00 committed by Michael H
parent cdb7a02cb8
commit 682b86c193
2 changed files with 15 additions and 4 deletions

View File

@ -0,0 +1 @@
Clear out usage of commands with ``<who_or_what>`` argument.

View File

@ -277,7 +277,9 @@ class Permissions(commands.Cog):
await self._permissions_acl_set(ctx, guild_id=ctx.guild.id, update=True) await self._permissions_acl_set(ctx, guild_id=ctx.guild.id, update=True)
@checks.is_owner() @checks.is_owner()
@permissions.command(name="addglobalrule") @permissions.command(
name="addglobalrule", usage="<allow_or_deny> <cog_or_command> <who_or_what>..."
)
async def permissions_addglobalrule( async def permissions_addglobalrule(
self, self,
ctx: commands.Context, ctx: commands.Context,
@ -308,7 +310,11 @@ class Permissions(commands.Cog):
@commands.guild_only() @commands.guild_only()
@checks.guildowner_or_permissions(administrator=True) @checks.guildowner_or_permissions(administrator=True)
@permissions.command(name="addserverrule", aliases=["addguildrule"]) @permissions.command(
name="addserverrule",
usage="<allow_or_deny> <cog_or_command> <who_or_what>...",
aliases=["addguildrule"],
)
async def permissions_addguildrule( async def permissions_addguildrule(
self, self,
ctx: commands.Context, ctx: commands.Context,
@ -338,7 +344,7 @@ class Permissions(commands.Cog):
await ctx.send(_("Rule added.")) await ctx.send(_("Rule added."))
@checks.is_owner() @checks.is_owner()
@permissions.command(name="removeglobalrule") @permissions.command(name="removeglobalrule", usage="<cog_or_command> <who_or_what>...")
async def permissions_removeglobalrule( async def permissions_removeglobalrule(
self, self,
ctx: commands.Context, ctx: commands.Context,
@ -361,7 +367,11 @@ class Permissions(commands.Cog):
@commands.guild_only() @commands.guild_only()
@checks.guildowner_or_permissions(administrator=True) @checks.guildowner_or_permissions(administrator=True)
@permissions.command(name="removeserverrule", aliases=["removeguildrule"]) @permissions.command(
name="removeserverrule",
usage="<cog_or_command> <who_or_what>...",
aliases=["removeguildrule"],
)
async def permissions_removeguildrule( async def permissions_removeguildrule(
self, self,
ctx: commands.Context, ctx: commands.Context,