Remove namedtuples to better future guard the library

This commit is contained in:
Tarek
2020-09-21 09:36:58 +02:00
committed by GitHub
parent e7b4bbe2f6
commit 7f17dc79a6
4 changed files with 28 additions and 11 deletions

View File

@ -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)