p

ackcord

gateway

package gateway

Source
gateway.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. gateway
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. sealed trait Compress extends AnyRef
  2. case class Dispatch[+D](sequence: Int, event: GatewayEvent[D], gatewayInfo: GatewayInfo) extends ServerGatewayMessage[D] with Product with Serializable

    Sent with each new event.

    Sent with each new event.

    sequence

    The seq number.

    event

    The sent event.

  3. sealed trait EagerGatewayMessage[D] extends GatewayMessage[D]
  4. sealed trait GatewayEvent[+D] extends AnyRef

    Base trait for all gateway events.

    Base trait for all gateway events.

    D

    The data this event carries.

  5. class GatewayHandlerGraphStage extends GraphStageWithMaterializedValue[FlowShape[GatewayMessage[_], GatewayMessage[_]], (Future[(Option[ResumeData], Boolean)], Future[Unit])]
  6. case class GatewayInfo(shardInfo: ShardInfo, currentSeq: Int) extends Product with Serializable

    currentSeq

    The current seq number when this message was received. Will be -1 if no seq has been received yet.

  7. type GatewayIntents = gateway.GatewayIntents.GatewayIntents
  8. implicit final class GatewayIntentsSyntax extends AnyVal
  9. class GatewayJsonException extends Exception
  10. sealed trait GatewayMessage[+D] extends AnyRef

    Base trait for all gateway messages.

  11. sealed abstract class GatewayOpCode extends IntEnumEntry

    All the different opcodes used by the gateway.

  12. class GatewayRatelimitedException extends Exception
  13. case class GatewaySettings(token: String, largeThreshold: Int = 50, shardNum: Int = 0, shardTotal: Int = 1, idleSince: Option[Instant] = None, activities: Seq[RawActivity] = Nil, status: PresenceStatus = PresenceStatus.Online, afk: Boolean = false, intents: GatewayIntents = GatewayIntents.AllNonPrivileged, compress: Compress = Compress.ZLibStreamCompress, eventDecoders: EventDecoders = GatewayProtocol.ackcordEventDecoders, restartBackoff: () => FiniteDuration = () => 5.minutes) 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

    activities

    Send an activity when connecting

    status

    The status to use when connecting

    afk

    If the bot should be afk when connecting

    intents

    Sets which events the gateway should send to the bot.

  14. case class Heartbeat(nowD: Option[Int], gatewayInfo: GatewayInfo) extends EagerGatewayMessage[Option[Int]] with ServerGatewayMessage[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.

  15. case class HeartbeatACK(gatewayInfo: GatewayInfo) extends EagerGatewayMessage[Unit] with ServerGatewayMessage[Unit] with Product with Serializable

    Sent by the gateway as a response to Heartbeat.

  16. case class Hello(nowD: HelloData, gatewayInfo: GatewayInfo) extends EagerGatewayMessage[HelloData] with ServerGatewayMessage[HelloData] with Product with Serializable

    Sent by the gateway as a response to Identify

  17. case class HelloData(heartbeatInterval: Int) extends Product with Serializable

    heartbeatInterval

    The amount of milliseconds inbetween the time to send a heartbeat.

  18. case class Identify(nowD: IdentifyData) extends EagerGatewayMessage[IdentifyData] with Product with Serializable

    Sent by the shard to log in.

  19. case class IdentifyData(token: String, properties: Map[String, String], compress: Boolean, largeThreshold: Int, shard: Seq[Int], presence: PresenceData, intents: GatewayIntents) 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.

  20. case class InvalidSession(resumable: Boolean, gatewayInfo: GatewayInfo) extends EagerGatewayMessage[Boolean] with ServerGatewayMessage[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.

  21. case class PresenceData(since: Option[Instant], activities: Seq[RawActivity], status: PresenceStatus, afk: Boolean) extends Product with Serializable

    since

    If present, instant when the user went idle.

    activities

    The presence activities.

    status

    The status of the user.

    afk

    If the user is AFK.

  22. case class PresenceUpdate(nowD: PresenceData, gatewayInfo: GatewayInfo) extends EagerGatewayMessage[PresenceData] with ServerGatewayMessage[PresenceData] with Product with Serializable

    Sent when a presence changes.

  23. case class Reconnect(gatewayInfo: GatewayInfo) extends EagerGatewayMessage[Unit] with ServerGatewayMessage[Unit] with Product with Serializable

    Sent by the gateway to indicate that the shard should reconnect.

  24. 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.

  25. case class RequestGuildMembersData(guildId: GuildId, query: Option[String] = None, limit: Option[Int] = None, presences: Boolean = false, userIds: Option[Seq[UserId]], nonce: Option[String]) 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.

    presences

    If the presences of the users should be sent too.

    userIds

    Users to fetch.

  26. case class Resume(nowD: ResumeData, gatewayInfo: GatewayInfo) extends EagerGatewayMessage[ResumeData] with ServerGatewayMessage[ResumeData] with Product with Serializable

    Sent by the shard instead of Identify when resuming a connection.

  27. 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.

  28. sealed trait ServerGatewayMessage[+D] extends GatewayMessage[D]
  29. case class ShardInfo(maxShards: Int, shardNum: Int) extends Product with Serializable

    maxShards

    The maximum amount of shards that was specified when this connection was established.

    shardNum

    The shard this message belongs to.

  30. case class UnknownGatewayMessage(op: GatewayOpCode, gatewayInfo: GatewayInfo) extends EagerGatewayMessage[Unit] with ServerGatewayMessage[Unit] with Product with Serializable

    All unknown gateway messages.

  31. case class VoiceServerUpdate(nowD: VoiceServerUpdateData, gatewayInfo: GatewayInfo) extends EagerGatewayMessage[VoiceServerUpdateData] with ServerGatewayMessage[VoiceServerUpdateData] with Product with Serializable
  32. 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.

  33. case class VoiceStateUpdate(nowD: VoiceStateUpdateData) extends EagerGatewayMessage[VoiceStateUpdateData] with Product with Serializable

    Sent by the bot to connect to a voice channel.

  34. case class VoiceStateUpdateData(guildId: GuildId, channelId: Option[VoiceGuildChannelId], 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.

Inherited from AnyRef

Inherited from Any

Ungrouped