package voice
- Source
- package.scala
- Alphabetic
- By Inheritance
- voice
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- sealed trait AudioAPIMessage extends AnyRef
The base trait for all audio events.
The base trait for all audio events. Note that the audio API does not have any connections to any ackcord.CacheSnapshot s. As such you have to find the objects for the IDs yourself.
- case class BidiShapeWithExtraIn[-In1, +Out1, -In2, +Out2, -EIn](in1: Inlet[In1], out1: Outlet[Out1], in2: Inlet[In2], out2: Outlet[Out2], extraIn: Inlet[EIn]) extends Shape with Product with Serializable
- case class Heartbeat(d: Int) extends VoiceMessage[Int] with Product with Serializable
Sent by the client at some interval specified by Hello
Sent by the client at some interval specified by Hello
- d
Nonce
- case class HeartbeatACK(d: Int) extends VoiceMessage[Int] with Product with Serializable
Sent by Discord as acknowledgement of our heartbeat
Sent by Discord as acknowledgement of our heartbeat
- d
The nonce we sent
- case class Hello(d: HelloData) extends VoiceMessage[HelloData] with Product with Serializable
Sent by Discord to tell us what heartbeat interval we should use.
- case class HelloData(heartbeatInterval: Double) extends Product with Serializable
Data of Hello
Data of Hello
- heartbeatInterval
How often to heartbeat
- class IPDiscoveryFlow extends GraphStageWithMaterializedValue[FlowShape[ByteString, ByteString], Future[FoundIP]]
- case class Identify(d: IdentifyData) extends VoiceMessage[IdentifyData] with Product with Serializable
Sent by the client to inform Discord that we want to send voice data.
Sent by the client to inform Discord that we want to send voice data. Discord responds with Ready
- case class IdentifyData(serverId: RawSnowflake, userId: UserId, sessionId: String, token: String) extends Product with Serializable
Data used by Identify
Data used by Identify
- serverId
The server id we want to connect to
- userId
Our user id
- sessionId
The session id received in ackcord.APIMessage.VoiceStateUpdate
- token
The token received in ackcord.APIMessage.VoiceServerUpdate
- class NaclBidiFlow extends GraphStage[BidiShapeWithExtraIn[ByteString, ByteString, ByteString, ReceivedData, Option[ByteString]]]
- case class RTPHeader(tpe: Byte, version: Byte, sequence: Short, timestamp: Int, ssrc: Int) extends Product with Serializable
Represents the RTP header used for sending and receiving voice data
Represents the RTP header used for sending and receiving voice data
- tpe
The type to use. Should be
0x80
- version
The version to use. Should be
0x78
- sequence
The sequence
- timestamp
Timestamp
- ssrc
SSRC of sender
- case class Ready(d: ReadyData) extends VoiceMessage[ReadyData] with Product with Serializable
Sent by Discord following Identify
- case class ReadyData(ssrc: Int, port: Int, ip: String, modes: Seq[String]) extends Product with Serializable
Data of Ready
Data of Ready
- ssrc
Our ssrc
- port
The port to connect to
- ip
The address to send voice data to
- modes
The supported modes
- case class Resume(d: ResumeData) extends VoiceMessage[ResumeData] with Product with Serializable
Sent by the client when we want to resume a connection after getting disconnected.
- case class ResumeData(serverId: RawSnowflake, sessionId: String, token: String) extends Product with Serializable
Data of Resume
Data of Resume
- serverId
The server id to resume for
- sessionId
The session id
- token
The token
- case class SelectProtocol(d: SelectProtocolData) extends VoiceMessage[SelectProtocolData] with Product with Serializable
Sent by the client when everything else is done.
Sent by the client when everything else is done. Discord responds with SessionDescription
- case class SelectProtocolConnectionData(address: String, port: Int, mode: String) extends Product with Serializable
Connection data used by SelectProtocol
Connection data used by SelectProtocol
- address
Our IP address discovered using ip discovery
- port
Our port discovered using ip discovery
- mode
The encryption mode, currently supports only xsalsa20_poly1305
- case class SelectProtocolData(protocol: String, data: SelectProtocolConnectionData) extends Product with Serializable
Data used by SelectProtocol
Data used by SelectProtocol
- protocol
The protocol to use, currently only supports udp
- data
The connection data
- case class SessionDescription(d: SessionDescriptionData) extends VoiceMessage[SessionDescriptionData] with Product with Serializable
Sent by Discord in response to SelectProtocol
- case class SessionDescriptionData(mode: String, secretKey: ByteString) extends Product with Serializable
Data of SessionDescription
Data of SessionDescription
- mode
The mode used
- secretKey
The secret key used for encryption
- case class Speaking(d: SpeakingData) extends VoiceMessage[SpeakingData] with Product with Serializable
Sent by Discord when a user is speaking, anc client when we want to set the bot as speaking.
Sent by Discord when a user is speaking, anc client when we want to set the bot as speaking. This is required before sending voice data.
- case class SpeakingData(speaking: SpeakingFlag, delay: util.JsonOption[Int], ssrc: util.JsonOption[Int], userId: util.JsonOption[UserId]) extends Product with Serializable
Data of Speaking
Data of Speaking
- speaking
If the user is speaking
- delay
Delay
- ssrc
The ssrc of the speaking user
- userId
Optional user id
- type SpeakingFlag = Long with Tagged[SpeakingFlag.type]
- implicit final class SpeakingFlagSyntax extends AnyVal
- case class UnknownVoiceMessage(op: VoiceOpCode) extends VoiceMessage[NotUsed] with Product with Serializable
Message for unknown voice opcode
- sealed trait VoiceMessage[D] extends AnyRef
Messages sent to the voice websocket.
- sealed abstract class VoiceOpCode extends IntEnumEntry
Voice opcode used by voice websocket
Value Members
- object AudioAPIMessage
- object IPDiscoveryFlow
- case object IgnoreClientDisconnect extends VoiceMessage[NotUsed] with Product with Serializable
Message for OpCode 13, should be ignored
- object NaclBidiFlow
- object RTPHeader extends Serializable
- case object Resumed extends VoiceMessage[NotUsed] with Product with Serializable
Send by Discord when we successfully resume a connection
- object SelectProtocol extends Serializable
- object Speaking extends Serializable
- object SpeakingFlag
- object VoiceHandler
- object VoiceOpCode extends IntEnum[VoiceOpCode] with IntCirceEnumWithUnknown[VoiceOpCode]
- object VoiceUDPFlow
- object VoiceUDPHandler
- object VoiceWsHandler
- object VoiceWsProtocol extends DiscordProtocol
- object WsHeart