[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 typing import List, Literal, Optional, TypedDict
|
||||||
from .snowflake import Snowflake
|
from .snowflake import Snowflake
|
||||||
from .channel import GuildChannel
|
from .channel import GuildChannel
|
||||||
from .voice import PartialVoiceState
|
from .voice import GuildVoiceState
|
||||||
from .welcome_screen import WelcomeScreen
|
from .welcome_screen import WelcomeScreen
|
||||||
from .activity import PartialPresenceUpdate
|
from .activity import PartialPresenceUpdate
|
||||||
from .role import Role
|
from .role import Role
|
||||||
@ -56,7 +56,7 @@ class _GuildOptional(TypedDict, total=False):
|
|||||||
joined_at: Optional[str]
|
joined_at: Optional[str]
|
||||||
large: bool
|
large: bool
|
||||||
member_count: int
|
member_count: int
|
||||||
voice_states: List[PartialVoiceState]
|
voice_states: List[GuildVoiceState]
|
||||||
members: List[Member]
|
members: List[Member]
|
||||||
channels: List[GuildChannel]
|
channels: List[GuildChannel]
|
||||||
presences: List[PartialPresenceUpdate]
|
presences: List[PartialPresenceUpdate]
|
||||||
|
@ -32,8 +32,7 @@ class _PartialVoiceStateOptional(TypedDict, total=False):
|
|||||||
self_stream: bool
|
self_stream: bool
|
||||||
|
|
||||||
|
|
||||||
class PartialVoiceState(_PartialVoiceStateOptional):
|
class _VoiceState(_PartialVoiceStateOptional):
|
||||||
channel_id: Optional[Snowflake]
|
|
||||||
user_id: Snowflake
|
user_id: Snowflake
|
||||||
session_id: str
|
session_id: str
|
||||||
deaf: bool
|
deaf: bool
|
||||||
@ -44,7 +43,12 @@ class PartialVoiceState(_PartialVoiceStateOptional):
|
|||||||
suppress: bool
|
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
|
guild_id: Snowflake
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user