Better detection for the everyone role. Fixes #23.

This commit is contained in:
Rapptz
2015-10-21 20:27:08 -04:00
parent edd3d47220
commit d2741ca38a
2 changed files with 8 additions and 5 deletions

View File

@ -197,8 +197,7 @@ class Role(object):
A boolean representing if the role will be displayed separately from other members.
.. attribute:: position
The position of the role. This number is usually positive. A non-positive value indicates that
this is the `@everyone` role.
The position of the role. This number is usually positive.
.. attribute:: managed
A boolean indicating if the role is managed by the server through some form of integration
@ -217,6 +216,7 @@ class Role(object):
self.hoist = kwargs.get('hoist', False)
self.managed = kwargs.get('managed', False)
self.color = self.colour
self._is_everyone = kwargs.get('everyone', False)
def is_everyone(self):
"""Checks if the role is the @everyone role."""