Browse Source

Pass kwargs to all constructors for future proofing.

pull/13/head
Rapptz 10 years ago
parent
commit
2559051e06
  1. 2
      discord/permissions.py
  2. 8
      discord/server.py

2
discord/permissions.py

@ -39,7 +39,7 @@ class Permissions(object):
were regular bools. This allows you to edit permissions.
"""
def __init__(self, permissions):
def __init__(self, permissions, **kwargs):
self.value = permissions
def _bit(self, index):

8
discord/server.py

@ -44,10 +44,10 @@ class Role(object):
A :class:`Permissions` that represents the role's permissions.
"""
def __init__(self, id, name, permissions):
self.id = id
self.name = name
self.permissions = Permissions(permissions)
def __init__(self, **kwargs):
self.id = kwargs.get('id')
self.name = kwargs.get('name')
self.permissions = Permissions(kwargs.get('permissions', 0))
class Member(User):
"""Represents a Discord member to a :class:`Server`.

Loading…
Cancel
Save