[Admin] Allow selfroleset command to consume multiple roles (#5238)

* Initial commit

* update docs

* remove usage kwargs

* style

* Type hint with SelfRole and not discord.Role

* fix docstring

* Various improvements, fixes

* i need to wake up

* more improvements

* AAAA

* add back check

* Improve converter error

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
Kreus Amredes
2021-09-01 23:37:45 +01:00
committed by GitHub
parent f8664a4e8a
commit b0f93a3ce1
3 changed files with 50 additions and 29 deletions

View File

@@ -17,5 +17,7 @@ class SelfRole(commands.Converter):
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