mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-03 16:59:04 +00:00
Use super() in classes that could be subclassed.
This commit is contained in:
1 parent
5a1d7a2d94
commit
948f565b43
3 files changed
+3
No files matched your search
@@ -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')
|
||||
|
||||
Reference in new issue
Block a user