Add Role.is_assignable()
This commit is contained in:
parent
65db814d4a
commit
6c8f1ccbdf
@ -258,6 +258,13 @@ class Role(Hashable):
|
|||||||
"""
|
"""
|
||||||
return self.tags is not None and self.tags.is_integration()
|
return self.tags is not None and self.tags.is_integration()
|
||||||
|
|
||||||
|
def is_assignable(self):
|
||||||
|
""":class:`bool`: Whether the role is able to be assigned or removed by the bot.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
|
"""
|
||||||
|
return not self.is_default() and not self.managed and self.guild.me.top_role > self
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def permissions(self):
|
def permissions(self):
|
||||||
""":class:`Permissions`: Returns the role's permissions."""
|
""":class:`Permissions`: Returns the role's permissions."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user