Browse Source
Fix typing of IntegrationAccount class
pull/7051/head
Josh
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
3 deletions
-
discord/integrations.py
|
|
@ -59,7 +59,7 @@ class IntegrationAccount: |
|
|
|
|
|
|
|
Attributes |
|
|
|
----------- |
|
|
|
id: :class:`int` |
|
|
|
id: :class:`str` |
|
|
|
The account ID. |
|
|
|
name: :class:`str` |
|
|
|
The account name. |
|
|
@ -68,8 +68,8 @@ class IntegrationAccount: |
|
|
|
__slots__ = ('id', 'name') |
|
|
|
|
|
|
|
def __init__(self, data: IntegrationAccountPayload) -> None: |
|
|
|
self.id: Optional[int] = _get_as_snowflake(data, 'id') |
|
|
|
self.name: str = data.pop('name') |
|
|
|
self.id: str = data['id'] |
|
|
|
self.name: str = data['name'] |
|
|
|
|
|
|
|
def __repr__(self) -> str: |
|
|
|
return f'<IntegrationAccount id={self.id} name={self.name!r}>' |
|
|
|