mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-20 16:00:29 +00:00
Use super() in classes that could be subclassed.
This commit is contained in:
parent
5a1d7a2d94
commit
948f565b43
@ -105,6 +105,7 @@ class Client:
|
||||
|
||||
"""
|
||||
def __init__(self, *, loop=None, **options):
|
||||
super().__init__(loop, **options)
|
||||
self.ws = None
|
||||
self.token = None
|
||||
self.gateway = None
|
||||
|
@ -44,4 +44,5 @@ class Object:
|
||||
"""
|
||||
|
||||
def __init__(self, id):
|
||||
super().__init__(id)
|
||||
self.id = id
|
||||
|
@ -56,6 +56,7 @@ class User:
|
||||
__slots__ = ['name', 'id', 'discriminator', 'avatar']
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
self.name = kwargs.get('username')
|
||||
self.id = kwargs.get('id')
|
||||
self.discriminator = kwargs.get('discriminator')
|
||||
|
Loading…
x
Reference in New Issue
Block a user