diff options
| author | Rapptz <[email protected]> | 2015-09-04 21:16:27 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2015-09-04 21:16:27 -0400 |
| commit | b00ad4ad790fb4ae0878572f27ee01cf25226843 (patch) | |
| tree | b7c453cfa900b0c479b4628217e2fc05b73b1fab /discord/channel.py | |
| parent | Add ability to delete channels. (diff) | |
| download | discord.py-b00ad4ad790fb4ae0878572f27ee01cf25226843.tar.xz discord.py-b00ad4ad790fb4ae0878572f27ee01cf25226843.zip | |
Use kwargs if the number of arguments needed is too many.
Diffstat (limited to 'discord/channel.py')
| -rw-r--r-- | discord/channel.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/discord/channel.py b/discord/channel.py index a7f04ad7..697872e3 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -52,14 +52,14 @@ class Channel(object): values in the :attr:`Server.roles` attribute. """ - def __init__(self, name, server, id, position, type, permission_overwrites=None, **kwargs): - self.name = name - self.server = server - self.id = id + def __init__(self, **kwargs): + self.name = kwargs.get('name') + self.server = kwargs.get('server') + self.id = kwargs.get('id') self.is_private = False - self.position = position - self.type = type - self.changed_roles = permission_overwrites if permission_overwrites is not None else [] + self.position = kwargs.get('position') + self.type = kwargs.get('type') + self.changed_roles = kwargs.get('permission_overwrites', []) class PrivateChannel(object): """Represents a Discord private channel. |