[types] Split PartialVoiceState for proper gateway type
This commit is contained in:
parent
746da7d54c
commit
c693945a46
@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE.
|
||||
from typing import List, Literal, Optional, TypedDict
|
||||
from .snowflake import Snowflake
|
||||
from .channel import GuildChannel
|
||||
from .voice import PartialVoiceState
|
||||
from .voice import GuildVoiceState
|
||||
from .welcome_screen import WelcomeScreen
|
||||
from .activity import PartialPresenceUpdate
|
||||
from .role import Role
|
||||
@ -56,7 +56,7 @@ class _GuildOptional(TypedDict, total=False):
|
||||
joined_at: Optional[str]
|
||||
large: bool
|
||||
member_count: int
|
||||
voice_states: List[PartialVoiceState]
|
||||
voice_states: List[GuildVoiceState]
|
||||
members: List[Member]
|
||||
channels: List[GuildChannel]
|
||||
presences: List[PartialPresenceUpdate]
|
||||
|
@ -32,8 +32,7 @@ class _PartialVoiceStateOptional(TypedDict, total=False):
|
||||
self_stream: bool
|
||||
|
||||
|
||||
class PartialVoiceState(_PartialVoiceStateOptional):
|
||||
channel_id: Optional[Snowflake]
|
||||
class _VoiceState(_PartialVoiceStateOptional):
|
||||
user_id: Snowflake
|
||||
session_id: str
|
||||
deaf: bool
|
||||
@ -44,7 +43,12 @@ class PartialVoiceState(_PartialVoiceStateOptional):
|
||||
suppress: bool
|
||||
|
||||
|
||||
class VoiceState(PartialVoiceState, total=False):
|
||||
class GuildVoiceState(_VoiceState):
|
||||
channel_id: Snowflake
|
||||
|
||||
|
||||
class VoiceState(_VoiceState, total=False):
|
||||
channel_id: Optional[Snowflake]
|
||||
guild_id: Snowflake
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user