mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-22 16:51:59 +00:00
Pass kwargs to all constructors for future proofing.
This commit is contained in:
parent
1b6fe0466d
commit
2559051e06
@ -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):
|
||||
|
@ -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…
x
Reference in New Issue
Block a user