From 0e4ccad32ae45a660d0670548e70299a416c5f78 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Wed, 26 Aug 2015 21:20:18 -0400 Subject: Parse permission_overwrites in every Channel instance. --- discord/channel.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'discord/channel.py') diff --git a/discord/channel.py b/discord/channel.py index 734ad64a..a7f04ad7 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -46,15 +46,20 @@ class Channel(object): .. attribute:: type The channel type. Usually ``'voice'`` or ``'text'``. + .. attribute:: changed_roles + + An array of :class:`Roles` that have been overridden from their default + values in the :attr:`Server.roles` attribute. """ - def __init__(self, name, server, id, position, type, **kwargs): + def __init__(self, name, server, id, position, type, permission_overwrites=None, **kwargs): self.name = name self.server = server self.id = id self.is_private = False self.position = position self.type = type + self.changed_roles = permission_overwrites if permission_overwrites is not None else [] class PrivateChannel(object): """Represents a Discord private channel. -- cgit v1.2.3