From 0706ee923294e84fb5dac806949dd5a1e10cc6d8 Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Sun, 11 Jul 2021 18:52:08 -0600 Subject: [PATCH] Add roleping list, closes #37 --- jarvis/cogs/admin.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/jarvis/cogs/admin.py b/jarvis/cogs/admin.py index 618660f..3d42863 100644 --- a/jarvis/cogs/admin.py +++ b/jarvis/cogs/admin.py @@ -952,6 +952,32 @@ class AdminCog(commands.Cog): ) await ctx.send(f"Role `{role.name}` removed blocklist.") + @cog_ext.cog_subcommand( + base="roleping", + name="list", + description="List all blocklisted roles", + guild_ids=[418094694325813248, 578757004059738142, 862402786116763668], + ) + async def _roleping_list(self, ctx: SlashContext): + roles = self.db.jarvis.settings.find_one( + {"guild": ctx.guild.id, "setting": "roleping"} + ) + if not roles: + await ctx.send("No blocklist configured.", hidden=True) + return + + message = "Blocklisted Roles:\n```\n" + if not roles["value"]: + await ctx.send("No roles blocklisted.", hidden=True) + return + for role in roles["value"]: + role = ctx.guild.get_role(role) + if not role: + continue + message += role.name + "\n" + message += "```" + await ctx.send(message) + @cog_ext.cog_subcommand( base="autopurge", name="add",