Browse Source
Handle role_id possibly being None for StreamIntegration
pull/7069/merge
Harmon
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
2 deletions
-
discord/integrations.py
-
discord/types/integration.py
|
|
@ -196,7 +196,7 @@ class StreamIntegration(Integration): |
|
|
|
self.expire_behaviour: ExpireBehaviour = try_enum(ExpireBehaviour, data['expire_behavior']) |
|
|
|
self.expire_grace_period: int = data['expire_grace_period'] |
|
|
|
self.synced_at: datetime.datetime = parse_time(data['synced_at']) |
|
|
|
self._role_id: int = int(data['role_id']) |
|
|
|
self._role_id: Optional[int] = _get_as_snowflake(data, 'role_id') |
|
|
|
self.syncing: bool = data['syncing'] |
|
|
|
self.enable_emoticons: bool = data['enable_emoticons'] |
|
|
|
self.subscriber_count: int = data['subscriber_count'] |
|
|
|
|
|
@ -69,7 +69,7 @@ class BaseIntegration(PartialIntegration): |
|
|
|
|
|
|
|
|
|
|
|
class StreamIntegration(BaseIntegration): |
|
|
|
role_id: Snowflake |
|
|
|
role_id: Optional[Snowflake] |
|
|
|
enable_emoticons: bool |
|
|
|
subscriber_count: int |
|
|
|
revoked: bool |
|
|
|