diff --git a/aurora/configuration/commands.py b/aurora/configuration/commands.py index cbef06f..1071f41 100644 --- a/aurora/configuration/commands.py +++ b/aurora/configuration/commands.py @@ -25,12 +25,15 @@ class Configuration(Mixin): await ctx.send(embed=await overrides(ctx), view=Overrides(ctx)) @aurora_settings.command(name="guild", aliases=["server"]) + @commands.admin_or_permissions(manage_guild=True) + @commands.guild_only() async def aurora_settings_guild(self, ctx: commands.Context): """Manage Aurora's guild settings.""" await ctx.send(embed=await guild(ctx)) @aurora_settings.command(name="addrole", aliases=["removerole"]) @commands.admin_or_permissions(manage_guild=True) + @commands.guild_only() async def aurora_settings_addrole(self, ctx: commands.Context): """Manage the addrole whitelist. @@ -39,6 +42,7 @@ class Configuration(Mixin): @aurora_settings.command(name="immunity") @commands.admin_or_permissions(manage_guild=True) + @commands.guild_only() async def aurora_settings_immunity(self, ctx: commands.Context): """Manage the immunity whitelist.""" await ctx.send(embed=await immune(ctx)) diff --git a/aurora/configuration/embed.py b/aurora/configuration/embed.py index b733aa1..93fd9d0 100644 --- a/aurora/configuration/embed.py +++ b/aurora/configuration/embed.py @@ -42,7 +42,7 @@ async def overrides(ctx: commands.Context) -> Embed: """ + override_str return e -async def guild(ctx: commands.Context) -> str: +async def guild(ctx: commands.Context) -> Embed: """Generates a configuration menu field value for a guild's settings.""" guild_settings = { @@ -79,9 +79,15 @@ async def guild(ctx: commands.Context) -> str: '- '+ bold("History Inline Pagesize: ") + get_pagesize_str(guild_settings['history_inline_pagesize']) ] guild_str = '\n'.join(guild_str) - return guild_str -async def addrole(ctx: commands.Context) -> str: + e = await _core(ctx) + e.title += ": Server Configuration" + e.description = """ + Use the buttons below to manage Aurora's server configuration.\n + """ + guild_str + return e + +async def addrole(ctx: commands.Context) -> Embed: """Generates a configuration menu field value for a guild's addrole whitelist.""" whitelist = await config.guild(ctx.guild).addrole_roles() @@ -114,7 +120,7 @@ async def addrole(ctx: commands.Context) -> str: return e -async def immune(ctx: commands.Context) -> str: +async def immune(ctx: commands.Context) -> Embed: """Generates a configuration menu field value for a guild's immune roles.""" immune_roles = await config.guild(ctx.guild).immune_roles()