diff --git a/forums/forums.py b/forums/forums.py index a8e3134..f4b8bfa 100644 --- a/forums/forums.py +++ b/forums/forums.py @@ -132,21 +132,9 @@ class Forums(commands.Cog): embed = discord.Embed(title="Cog Settings", color=await self.bot.get_embed_color(None), description=channel + tag_str + roles_list) await ctx.reply(embed=embed) - @resolvedset.group(name='role', invoke_without_command=True, aliases=['roles']) + @resolvedset.group(name='role', autohelp=True, aliases=['roles']) async def resolvedset_role(self, ctx: commands.Context): """Manages the allowed roles list.""" - current_list = await self.config.guild(ctx.guild).request_roles() - already_in_list = [] - for role_id in current_list: - role_obj = ctx.guild.get_role(role_id) - if role_obj: - already_in_list.append(role_obj.mention) - split_content = ctx.message.content.split() - command = ' '.join(split_content[:2]) - if already_in_list: - await ctx.send("Roles already in the allowed roles list:\n" + "\n".join(already_in_list) + f"\nUse `{command} add` to add roles to this list.\nUse `{command} remove` to remove roles from this list.", allowed_mentions=discord.AllowedMentions(roles=False)) - else: - await ctx.send(f"No roles are currently in the allowed roles list.\nUse `{command} add` to add some!") @resolvedset_role.command(name='add') async def resolvedset_role_add(self, ctx: commands.Context, role: discord.Role = None):