Repository: Cog-Creators/Red-DiscordBot

Issue:
Allow selfroleset multiple params
### What component of Red (cog, command, API) would you like to see improvements on?

Core/Admin

### Describe the enhancement you're suggesting.

So currently `selfroleset add` does not do multiple parameters.

Like I did this, expecting the roles "she", "he", and "they" to become self settable, but this happened: 
![image](https://user-images.githubusercontent.com/9358770/131557269-2ab5665b-98bb-416c-8bc5-d9f8e16d7497.png)

So it turns out i have to do the roles individually

### Anything else?

I think this would be a pretty useful enhancement tbh


Discussion:
Any chance I could be assigned to this one?

Resolving patch:
diff --git a/redbot/cogs/admin/admin.py b/redbot/cogs/admin/admin.py
--- a/redbot/cogs/admin/admin.py
+++ b/redbot/cogs/admin/admin.py
@@ -450,45 +450,64 @@ async def selfroleset(self, ctx: commands.Context):
         pass
 
     @selfroleset.command(name="add")
-    async def selfroleset_add(self, ctx: commands.Context, *, role: discord.Role):
+    async def selfroleset_add(self, ctx: commands.Context, *roles: discord.Role):
         """
-        Add a role to the list of available selfroles.
+        Add a role, or a selection of roles, to the list of available selfroles.
 
         NOTE: The role is case sensitive!
         """
-        if not self.pass_user_hierarchy_check(ctx, role):
-            await ctx.send(
-                _(
-                    "I cannot let you add {role.name} as a selfrole because that role is higher than or equal to your highest role in the Discord hierarchy."
-                ).format(role=role)
-            )
-            return
-        async with self.config.guild(ctx.guild).selfroles() as curr_selfroles:
-            if role.id not in curr_selfroles:
-                curr_selfroles.append(role.id)
-                await ctx.send(_("Added."))
+        current_selfroles = await self.config.guild(ctx.guild).selfroles()
+        for role in roles:
+            if not self.pass_user_hierarchy_check(ctx, role):
+                await ctx.send(
+                    _(
+                        "I cannot let you add {role.name} as a selfrole because that role is"
+                        " higher than or equal to your highest role in the Discord hierarchy."
+                    ).format(role=role)
+                )
                 return
+            if role.id not in current_selfroles:
+                current_selfroles.append(role.id)
+            else:
+                await ctx.send(
+                    _('The role "{role.name}" is already a selfrole.').format(role=role)
+                )
+                return
+
+        await self.config.guild(ctx.guild).selfroles.set(current_selfroles)
+        if (count := len(roles)) > 1:
+            message = _("Added {count} selfroles.").format(count=count)
+        else:
+            message = _("Added 1 selfrole.")
 
-        await ctx.send(_("That role is already a selfrole."))
+        await ctx.send(message)
 
     @selfroleset.command(name="remove")
-    async def selfroleset_remove(self, ctx: commands.Context, *, role: SelfRole):
+    async def selfroleset_remove(self, ctx: commands.Context, *roles: SelfRole):
         """
-        Remove a role from the list of available selfroles.
+        Remove a role, or a selection of roles, from the list of available selfroles.
 
         NOTE: The role is case sensitive!
         """
-        if not self.pass_user_hierarchy_check(ctx, role):
-            await ctx.send(
-                _(
-                    "I cannot let you remove {role.name} from being a selfrole because that role is higher than or equal to your highest role in the Discord hierarchy."
-                ).format(role=role)
-            )
-            return
-        async with self.config.guild(ctx.guild).selfroles() as curr_selfroles:
-            curr_selfroles.remove(role.id)
+        current_selfroles = await self.config.guild(ctx.guild).selfroles()
+        for role in roles:
+            if not self.pass_user_hierarchy_check(ctx, role):
+                await ctx.send(
+                    _(
+                        "I cannot let you remove {role.name} from being a selfrole because that role is higher than or equal to your highest role in the Discord hierarchy."
+                    ).format(role=role)
+                )
+                return
+            current_selfroles.remove(role.id)
+
+        await self.config.guild(ctx.guild).selfroles.set(current_selfroles)
+
+        if (count := len(roles)) > 1:
+            message = _("Removed {count} selfroles.").format(count=count)
+        else:
+            message = _("Removed 1 selfrole.")
 
-        await ctx.send(_("Removed."))
+        await ctx.send(message)
 
     @commands.command()
     @checks.is_owner()
diff --git a/redbot/cogs/admin/converters.py b/redbot/cogs/admin/converters.py
--- a/redbot/cogs/admin/converters.py
+++ b/redbot/cogs/admin/converters.py
@@ -17,5 +17,7 @@ async def convert(self, ctx: commands.Context, arg: str) -> discord.Role:
         selfroles = await admin.config.guild(ctx.guild).selfroles()
 
         if role.id not in selfroles:
-            raise commands.BadArgument(_("The provided role is not a valid selfrole."))
+            raise commands.BadArgument(
+                _('The role "{role_name}" is not a valid selfrole.').format(role_name=role.name)
+            )
         return role


Test patch: