mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-17 03:09:05 +00:00
Handle role_id possibly being None for StreamIntegration
This commit is contained in:
parent
233d10649c
commit
1a3422dccc
@ -196,7 +196,7 @@ class StreamIntegration(Integration):
|
|||||||
self.expire_behaviour: ExpireBehaviour = try_enum(ExpireBehaviour, data['expire_behavior'])
|
self.expire_behaviour: ExpireBehaviour = try_enum(ExpireBehaviour, data['expire_behavior'])
|
||||||
self.expire_grace_period: int = data['expire_grace_period']
|
self.expire_grace_period: int = data['expire_grace_period']
|
||||||
self.synced_at: datetime.datetime = parse_time(data['synced_at'])
|
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.syncing: bool = data['syncing']
|
||||||
self.enable_emoticons: bool = data['enable_emoticons']
|
self.enable_emoticons: bool = data['enable_emoticons']
|
||||||
self.subscriber_count: int = data['subscriber_count']
|
self.subscriber_count: int = data['subscriber_count']
|
||||||
|
@ -69,7 +69,7 @@ class BaseIntegration(PartialIntegration):
|
|||||||
|
|
||||||
|
|
||||||
class StreamIntegration(BaseIntegration):
|
class StreamIntegration(BaseIntegration):
|
||||||
role_id: Snowflake
|
role_id: Optional[Snowflake]
|
||||||
enable_emoticons: bool
|
enable_emoticons: bool
|
||||||
subscriber_count: int
|
subscriber_count: int
|
||||||
revoked: bool
|
revoked: bool
|
||||||
|
Loading…
x
Reference in New Issue
Block a user