mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 01:12:33 -05:00
* 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
(cherry picked from commit b0f93a3ce1)
Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Kreus Amredes <67752638+Kreusada@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user