diff options
| author | Rapptz <[email protected]> | 2015-12-19 06:18:12 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-12-19 06:18:12 -0500 |
| commit | f1f0e169e425ac9c849561788281e27bd8bb0acd (patch) | |
| tree | 0a6d6717303c57e0902fd5dea043f2f83ff4a5e4 /discord/role.py | |
| parent | Add listener for on_ready event for easier background tasks. (diff) | |
| download | discord.py-f1f0e169e425ac9c849561788281e27bd8bb0acd.tar.xz discord.py-f1f0e169e425ac9c849561788281e27bd8bb0acd.zip | |
Add __slots__ where appropriate to data classes.
Diffstat (limited to 'discord/role.py')
| -rw-r--r-- | discord/role.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/discord/role.py b/discord/role.py index a78a4af7..7b4c1d5e 100644 --- a/discord/role.py +++ b/discord/role.py @@ -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) |