License info command (#3090)

* Adds a licenseinfo command

* good enough for now

* changelog

* *sigh* Fine, have it your way Draper

* thanks Flame
This commit is contained in:
Michael H
2019-11-09 14:06:07 -05:00
committed by GitHub
parent 418f957332
commit 6852b7a1d1
5 changed files with 78 additions and 4 deletions

View File

@@ -299,6 +299,14 @@ class Permissions(commands.Cog):
if not who_or_what:
await ctx.send_help()
return
if isinstance(cog_or_command.obj, commands.commands._AlwaysAvailableCommand):
await ctx.send(
_(
"This command is designated as being always available and "
"cannot be modified by permission rules."
)
)
return
for w in who_or_what:
await self._add_rule(
rule=cast(bool, allow_or_deny),
@@ -334,6 +342,14 @@ class Permissions(commands.Cog):
if not who_or_what:
await ctx.send_help()
return
if isinstance(cog_or_command.obj, commands.commands._AlwaysAvailableCommand):
await ctx.send(
_(
"This command is designated as being always available and "
"cannot be modified by permission rules."
)
)
return
for w in who_or_what:
await self._add_rule(
rule=cast(bool, allow_or_deny),