mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-08 19:03:03 +00:00
Add __slots__ where appropriate to data classes.
This commit is contained in:
@ -53,8 +53,8 @@ class Role(Hashable):
|
||||
The name of the role.
|
||||
permissions : :class:`Permissions`
|
||||
Represents the role's permissions.
|
||||
color : :class:`Colour`
|
||||
Represents the role colour.
|
||||
colour : :class:`Colour`
|
||||
Represents the role colour. An alias exists under ``color``.
|
||||
hoist : bool
|
||||
Indicates if the role will be displayed separately from other members.
|
||||
position : int
|
||||
@ -64,6 +64,9 @@ class Role(Hashable):
|
||||
integrations such as Twitch.
|
||||
"""
|
||||
|
||||
__slots__ = ['id', 'name', 'permissions', 'color', 'colour', 'position',
|
||||
'managed', '_is_everyone', 'hoist' ]
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self._is_everyone = kwargs.get('everyone', False)
|
||||
self.update(**kwargs)
|
||||
|
Reference in New Issue
Block a user