mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-04 08:56:19 +00:00
Remove namedtuples to better future guard the library
This commit is contained in:
@ -25,13 +25,12 @@ DEALINGS IN THE SOFTWARE.
|
||||
"""
|
||||
|
||||
import datetime
|
||||
from collections import namedtuple
|
||||
from .utils import _get_as_snowflake, get, parse_time
|
||||
from .user import User
|
||||
from .errors import InvalidArgument
|
||||
from .enums import try_enum, ExpireBehaviour
|
||||
|
||||
class IntegrationAccount(namedtuple('IntegrationAccount', 'id name')):
|
||||
class IntegrationAccount:
|
||||
"""Represents an integration account.
|
||||
|
||||
.. versionadded:: 1.4
|
||||
@ -44,7 +43,11 @@ class IntegrationAccount(namedtuple('IntegrationAccount', 'id name')):
|
||||
The account name.
|
||||
"""
|
||||
|
||||
__slots__ = ()
|
||||
__slots__ = ('id', 'name')
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self.id = kwargs.pop('id')
|
||||
self.name = kwargs.pop('name')
|
||||
|
||||
def __repr__(self):
|
||||
return '<IntegrationAccount id={0.id} name={0.name!r}>'.format(self)
|
||||
|
Reference in New Issue
Block a user