Add Role.mentionable attribute.

This commit is contained in:
Rapptz 2016-04-29 19:29:29 -04:00
parent 29b01f20ba
commit 196e9463f5

View File

@ -63,10 +63,12 @@ class Role(Hashable):
managed : bool managed : bool
Indicates if the role is managed by the server through some form of Indicates if the role is managed by the server through some form of
integrations such as Twitch. integrations such as Twitch.
mentionable : bool
Indicates if the role can be mentioned by users.
""" """
__slots__ = ['id', 'name', 'permissions', 'color', 'colour', 'position', __slots__ = ['id', 'name', 'permissions', 'color', 'colour', 'position',
'managed', '_is_everyone', 'hoist' ] 'managed', 'mentionable', '_is_everyone', 'hoist' ]
def __init__(self, **kwargs): def __init__(self, **kwargs):
self._is_everyone = kwargs.get('everyone', False) self._is_everyone = kwargs.get('everyone', False)
@ -83,6 +85,7 @@ class Role(Hashable):
self.colour = Colour(kwargs.get('color', 0)) self.colour = Colour(kwargs.get('color', 0))
self.hoist = kwargs.get('hoist', False) self.hoist = kwargs.get('hoist', False)
self.managed = kwargs.get('managed', False) self.managed = kwargs.get('managed', False)
self.mentionable = kwargs.get('mentionable', False)
self.color = self.colour self.color = self.colour
if 'everyone' in kwargs: if 'everyone' in kwargs:
self._is_everyone = kwargs['everyone'] self._is_everyone = kwargs['everyone']