mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-20 09:56:05 -05:00
Add settings view commands (#4041)
Any group which sent help + settings views has had the settings view split into a seperate command. This ensures that custom help behavior does not interfere with settings views.
This commit is contained in:
@@ -224,13 +224,15 @@ class Permissions(commands.Cog):
|
||||
@permissions.group(name="acl", aliases=["yaml"])
|
||||
async def permissions_acl(self, ctx: commands.Context):
|
||||
"""Manage permissions with YAML files."""
|
||||
if ctx.invoked_subcommand is None or ctx.invoked_subcommand == self.permissions_acl:
|
||||
# Send a little guide on YAML formatting
|
||||
await ctx.send(
|
||||
_("Example YAML for setting rules:\n")
|
||||
+ box(
|
||||
textwrap.dedent(
|
||||
"""\
|
||||
|
||||
@permissions_acl.command(name="yamlexample")
|
||||
async def permissions_acl_yaml_example(self, ctx: commands.Context):
|
||||
"""Sends an example of the yaml layout for permissions"""
|
||||
await ctx.send(
|
||||
_("Example YAML for setting rules:\n")
|
||||
+ box(
|
||||
textwrap.dedent(
|
||||
"""\
|
||||
COMMAND:
|
||||
ping:
|
||||
12345678901234567: true
|
||||
@@ -241,10 +243,10 @@ class Permissions(commands.Cog):
|
||||
12345678901234567: false
|
||||
default: false
|
||||
"""
|
||||
),
|
||||
lang="yaml",
|
||||
)
|
||||
),
|
||||
lang="yaml",
|
||||
)
|
||||
)
|
||||
|
||||
@checks.is_owner()
|
||||
@permissions_acl.command(name="setglobal")
|
||||
|
||||
Reference in New Issue
Block a user