Copyright | (c) Yuto Takano (2021) |
---|---|
License | MIT |
Maintainer | moa17stock@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
Discord.Internal.Types.VoiceWebsocket
Description
WARNING
This module is considered internal.
The Package Versioning Policy does not apply.
The contents of this module may change in any way whatsoever and without any warning between minor versions of this package.
Description
This module defines basic types for the communication packets in the Discord Voice Gateway. Some ToJSON and FromJSON instances are defined, as according to the official Discord documentation for v4 of the gateway.
Prisms are defined using TemplateHaskell for VoiceWebsocketReceivable.
Documentation
data VoiceWebsocketReceivable Source #
Constructors
Ready ReadyPayload | |
SessionDescription Text [Word8] | |
SpeakingR SpeakingPayload | |
HeartbeatAck Int | |
Hello Int | Int because this is heartbeat, and threadDelay uses it |
Resumed | |
ClientDisconnect UserId | |
UnknownOPCode Integer Object | |
ParseError Text | |
Reconnect |
Instances
Eq VoiceWebsocketReceivable Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket Methods (==) :: VoiceWebsocketReceivable -> VoiceWebsocketReceivable -> Bool # (/=) :: VoiceWebsocketReceivable -> VoiceWebsocketReceivable -> Bool # | |
Show VoiceWebsocketReceivable Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket Methods showsPrec :: Int -> VoiceWebsocketReceivable -> ShowS # show :: VoiceWebsocketReceivable -> String # showList :: [VoiceWebsocketReceivable] -> ShowS # | |
FromJSON VoiceWebsocketReceivable Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket Methods parseJSON :: Value -> Parser VoiceWebsocketReceivable # parseJSONList :: Value -> Parser [VoiceWebsocketReceivable] # | |
HasWebsocket DiscordVoiceHandle (Weak ThreadId, (VoiceWebsocketReceiveChan, VoiceWebsocketSendChan)) Source # | |
Defined in Discord.Internal.Types.VoiceCommon | |
HasWsHandle WebsocketLaunchOpts (VoiceWebsocketReceiveChan, VoiceWebsocketSendChan) Source # | |
Defined in Discord.Internal.Types.VoiceCommon |
data VoiceWebsocketSendable Source #
Constructors
Identify IdentifyPayload | |
SelectProtocol SelectProtocolPayload | |
Heartbeat Int | Int because threadDelay uses it |
Speaking SpeakingPayload | |
Resume GuildId Text Text |
Instances
Eq VoiceWebsocketSendable Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket Methods (==) :: VoiceWebsocketSendable -> VoiceWebsocketSendable -> Bool # (/=) :: VoiceWebsocketSendable -> VoiceWebsocketSendable -> Bool # | |
Show VoiceWebsocketSendable Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket Methods showsPrec :: Int -> VoiceWebsocketSendable -> ShowS # show :: VoiceWebsocketSendable -> String # showList :: [VoiceWebsocketSendable] -> ShowS # | |
ToJSON VoiceWebsocketSendable Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket Methods toJSON :: VoiceWebsocketSendable -> Value # toEncoding :: VoiceWebsocketSendable -> Encoding # toJSONList :: [VoiceWebsocketSendable] -> Value # | |
HasWebsocket DiscordVoiceHandle (Weak ThreadId, (VoiceWebsocketReceiveChan, VoiceWebsocketSendChan)) Source # | |
Defined in Discord.Internal.Types.VoiceCommon | |
HasWsHandle WebsocketLaunchOpts (VoiceWebsocketReceiveChan, VoiceWebsocketSendChan) Source # | |
Defined in Discord.Internal.Types.VoiceCommon |
data ReadyPayload Source #
Constructors
ReadyPayload | |
Fields |
Instances
Eq ReadyPayload Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket | |
Show ReadyPayload Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket Methods showsPrec :: Int -> ReadyPayload -> ShowS # show :: ReadyPayload -> String # showList :: [ReadyPayload] -> ShowS # |
data SpeakingPayload Source #
Constructors
SpeakingPayload | |
Instances
Eq SpeakingPayload Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket Methods (==) :: SpeakingPayload -> SpeakingPayload -> Bool # (/=) :: SpeakingPayload -> SpeakingPayload -> Bool # | |
Show SpeakingPayload Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket Methods showsPrec :: Int -> SpeakingPayload -> ShowS # show :: SpeakingPayload -> String # showList :: [SpeakingPayload] -> ShowS # |
data IdentifyPayload Source #
Constructors
IdentifyPayload | |
Instances
Eq IdentifyPayload Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket Methods (==) :: IdentifyPayload -> IdentifyPayload -> Bool # (/=) :: IdentifyPayload -> IdentifyPayload -> Bool # | |
Show IdentifyPayload Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket Methods showsPrec :: Int -> IdentifyPayload -> ShowS # show :: IdentifyPayload -> String # showList :: [IdentifyPayload] -> ShowS # |
data SelectProtocolPayload Source #
Constructors
SelectProtocolPayload | |
Instances
Eq SelectProtocolPayload Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket Methods (==) :: SelectProtocolPayload -> SelectProtocolPayload -> Bool # (/=) :: SelectProtocolPayload -> SelectProtocolPayload -> Bool # | |
Show SelectProtocolPayload Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket Methods showsPrec :: Int -> SelectProtocolPayload -> ShowS # show :: SelectProtocolPayload -> String # showList :: [SelectProtocolPayload] -> ShowS # |