Copyright | (c) Yuto Takano (2021) |
---|---|
License | MIT |
Maintainer | moa17stock@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
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.
Synopsis
- data VoiceWebsocketReceivable
- _Ready :: Traversal' VoiceWebsocketReceivable ReadyPayload
- _SessionDescription :: Traversal' VoiceWebsocketReceivable (Text, [Word8])
- _Hello :: Traversal' VoiceWebsocketReceivable Int
- data VoiceWebsocketSendable
- data ReadyPayload = ReadyPayload {}
- data SpeakingPayload = SpeakingPayload {}
- data IdentifyPayload = IdentifyPayload {}
- data SelectProtocolPayload = SelectProtocolPayload {}
Documentation
data VoiceWebsocketReceivable Source #
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
data VoiceWebsocketSendable Source #
Identify IdentifyPayload | |
SelectProtocol SelectProtocolPayload | |
Heartbeat Int | Int because threadDelay uses it |
Speaking SpeakingPayload | |
Resume GuildId Text Text |
Instances
data ReadyPayload Source #
Instances
Eq ReadyPayload Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket (==) :: ReadyPayload -> ReadyPayload -> Bool # (/=) :: ReadyPayload -> ReadyPayload -> Bool # | |
Show ReadyPayload Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket showsPrec :: Int -> ReadyPayload -> ShowS # show :: ReadyPayload -> String # showList :: [ReadyPayload] -> ShowS # |
data SpeakingPayload Source #
Instances
Eq SpeakingPayload Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket (==) :: SpeakingPayload -> SpeakingPayload -> Bool # (/=) :: SpeakingPayload -> SpeakingPayload -> Bool # | |
Show SpeakingPayload Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket showsPrec :: Int -> SpeakingPayload -> ShowS # show :: SpeakingPayload -> String # showList :: [SpeakingPayload] -> ShowS # |
data IdentifyPayload Source #
Instances
Eq IdentifyPayload Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket (==) :: IdentifyPayload -> IdentifyPayload -> Bool # (/=) :: IdentifyPayload -> IdentifyPayload -> Bool # | |
Show IdentifyPayload Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket showsPrec :: Int -> IdentifyPayload -> ShowS # show :: IdentifyPayload -> String # showList :: [IdentifyPayload] -> ShowS # |
data SelectProtocolPayload Source #
Instances
Eq SelectProtocolPayload Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket (==) :: SelectProtocolPayload -> SelectProtocolPayload -> Bool # (/=) :: SelectProtocolPayload -> SelectProtocolPayload -> Bool # | |
Show SelectProtocolPayload Source # | |
Defined in Discord.Internal.Types.VoiceWebsocket showsPrec :: Int -> SelectProtocolPayload -> ShowS # show :: SelectProtocolPayload -> String # showList :: [SelectProtocolPayload] -> ShowS # |
''VoiceWebsocketReceivable)