package gateway
- Alphabetic
- Public
- All
Type Members
-
sealed
trait
ComplexGatewayEvent[D, HandlerType] extends AnyRef
Base trait for all gateway events.
Base trait for all gateway events.
- D
The data this event carries.
- HandlerType
The type the cache handler takes.
-
case class
Dispatch[D](sequence: Int, event: ComplexGatewayEvent[D, _])(implicit dataEncoder: Encoder[D]) extends GatewayMessage[D] with Product with Serializable
Sent with each new event.
Sent with each new event.
- sequence
The seq number.
- event
The sent event.
- sealed trait EagerGatewayMessage[D] extends GatewayMessage[D]
-
class
GatewayHandler extends Actor with Timers with ActorLogging
Responsible for normal websocket communication with Discord.
Responsible for normal websocket communication with Discord. Some REST messages can't be sent until this has authenticated.
- class GatewayHandlerGraphStage extends GraphStageWithMaterializedValue[FanOutShape2[GatewayMessage[_], GatewayMessage[_], Dispatch[_]], Future[Option[ResumeData]]]
-
sealed
trait
GatewayMessage[D] extends AnyRef
Base trait for all gateway messages.
-
sealed abstract
case class
GatewayOpCode extends Product with Serializable
All the different opcodes used by the gateway.
-
case class
GatewaySettings(token: String, largeThreshold: Int = 50, shardNum: Int = 0, shardTotal: Int = 1, idleSince: Option[Instant] = None, activity: Option[RawActivity] = None, status: PresenceStatus = PresenceStatus.Online, afk: Boolean = false) extends Product with Serializable
All the settings used by AckCord when connecting and similar
All the settings used by AckCord when connecting and similar
- token
The token for the bot
- largeThreshold
The large threshold
- shardNum
The shard index of this
- shardTotal
The amount of shards
- idleSince
If the bot has been idle, set the time since
- activity
Send an activity when connecting
- status
The status to use when connecting
- afk
If the bot should be afk when connecting
-
case class
Heartbeat(nowD: Option[Int]) extends EagerGatewayMessage[Option[Int]] with Product with Serializable
Sent and received to confirm the connection is still going.
Sent and received to confirm the connection is still going.
- nowD
The previous sequence.
-
case class
Hello(nowD: HelloData) extends EagerGatewayMessage[HelloData] with Product with Serializable
Sent by the gateway as a response to Identify
-
case class
HelloData(heartbeatInterval: Int, _trace: Seq[String]) extends Product with Serializable
- heartbeatInterval
The amount of milliseconds inbetween the time to send a heartbeat.
-
case class
Identify(nowD: IdentifyData) extends EagerGatewayMessage[IdentifyData] with Product with Serializable
Sent by the shard to log in.
-
case class
IdentifyData(token: String, properties: Map[String, String], compress: Boolean, largeThreshold: Int, shard: Seq[Int], presence: StatusData) extends Product with Serializable
- token
The bot token.
- properties
A map of properties to send.
- compress
If compressed messages should be used.
- largeThreshold
The threshold where the gateway stops sending offline users.
- shard
The shard info, the first index is the shard id, while the second is the total amount of shards.
- presence
The presence data to start with.
-
case class
InvalidSession(resumable: Boolean) extends EagerGatewayMessage[Boolean] with Product with Serializable
Sent by the gateway if the session is invalid when resuming a connection.
Sent by the gateway if the session is invalid when resuming a connection.
- resumable
If the connection is resumable.
-
case class
RequestGuildMembers(nowD: RequestGuildMembersData) extends EagerGatewayMessage[RequestGuildMembersData] with Product with Serializable
Sent by the shard to receive all the members of a guild, even logged out ones.
-
case class
RequestGuildMembersData(guildId: Either[Seq[GuildId], GuildId], query: String = "", limit: Int = 0) extends Product with Serializable
- guildId
The guildId(s) to request for.
- query
Return all the users where their username start with this. or an empty string for all users.
- limit
The amount of users to send, or 0 for all users.
-
case class
Resume(nowD: ResumeData) extends EagerGatewayMessage[ResumeData] with Product with Serializable
Sent by the shard instead of Identify when resuming a connection.
-
case class
ResumeData(token: String, sessionId: String, seq: Int) extends Product with Serializable
- token
The bot token.
- sessionId
The sessionId received earlier.
- seq
The last seq received.
-
sealed
trait
SimpleGatewayEvent[D] extends ComplexGatewayEvent[D, D]
A simpler gateway event where the data type and the handler type are the same.
-
case class
StatusData(since: Option[Instant], game: Option[RawActivity], status: PresenceStatus, afk: Boolean) extends Product with Serializable
- since
If present, instant when the user went idle.
- game
The presence text.
- status
The status of the user.
- afk
If the user is AFK.
-
case class
StatusUpdate(nowD: StatusData) extends EagerGatewayMessage[StatusData] with Product with Serializable
Sent when a presence or status changes.
- case class VoiceServerUpdate(nowD: VoiceServerUpdateData) extends EagerGatewayMessage[VoiceServerUpdateData] with Product with Serializable
-
case class
VoiceServerUpdateData(token: String, guildId: GuildId, endpoint: String) extends Product with Serializable
- token
The voice connection token.
- guildId
The guild of the update.
- endpoint
The voice server.
-
case class
VoiceStateUpdate(nowD: VoiceStateUpdateData) extends EagerGatewayMessage[VoiceStateUpdateData] with Product with Serializable
Sent by the bot to connect to a voice channel.
-
case class
VoiceStateUpdateData(guildId: GuildId, channelId: Option[ChannelId], selfMute: Boolean, selfDeaf: Boolean) extends Product with Serializable
- guildId
The channel the voice channel is in.
- channelId
The voice channel to join.
- selfMute
If the bot should mute itself.
- selfDeaf
If the bot should deafen itself.
Value Members
- object GatewayEvent
- object GatewayHandler
- object GatewayHandlerGraphStage
- object GatewayOpCode extends Serializable
- object GatewayProtocol extends DiscordProtocol
-
object
HeartbeatACK extends EagerGatewayMessage[NotUsed] with Product with Serializable
Sent by the gateway as a response to Heartbeat.
- object IdentifyData extends Serializable
-
object
Reconnect extends EagerGatewayMessage[NotUsed] with Product with Serializable
Sent by the gateway to indicate that the shard should reconnect.