p

ackcord

gateway

package gateway

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

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

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

  3. sealed trait EagerGatewayMessage[D] extends GatewayMessage[D]
  4. class GatewayHandlerGraphStage extends GraphStageWithMaterializedValue[FanOutShape2[GatewayMessage[_], GatewayMessage[_], Dispatch[_]], Future[Option[ResumeData]]]
  5. class GatewayJsonException extends Exception
  6. sealed trait GatewayMessage[D] extends AnyRef

    Base trait for all gateway messages.

  7. sealed abstract class GatewayOpCode extends IntEnumEntry

    All the different opcodes used by the gateway.

  8. 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, guildSubscriptions: Boolean = true) 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

    guildSubscriptions

    If member presence events and similar should be received. AckCord has not been tested with this flag set to false. Continue with caution.

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

  10. case class Hello(nowD: HelloData) extends EagerGatewayMessage[HelloData] with Product with Serializable

    Sent by the gateway as a response to Identify

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

    heartbeatInterval

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

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

    Sent by the shard to log in.

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

    guildSubscriptions

    If member presence events and similar should be received. AckCord has not been tested with this flag. Continue with caution.

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

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

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

  17. case class Resume(nowD: ResumeData) extends EagerGatewayMessage[ResumeData] with Product with Serializable

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

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

  19. sealed trait SimpleGatewayEvent[D] extends ComplexGatewayEvent[D, D]

    A simpler gateway event where the data type and the handler type are the same.

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

  21. case class StatusUpdate(nowD: StatusData) extends EagerGatewayMessage[StatusData] with Product with Serializable

    Sent when a presence or status changes.

  22. case class VoiceServerUpdate(nowD: VoiceServerUpdateData) extends EagerGatewayMessage[VoiceServerUpdateData] with Product with Serializable
  23. 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.

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

    Sent by the bot to connect to a voice channel.

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

  1. object GatewayEvent
  2. object GatewayHandler
  3. object GatewayHandlerGraphStage
  4. object GatewayOpCode extends IntEnum[GatewayOpCode] with IntCirceEnum[GatewayOpCode]
  5. object GatewayProtocol extends DiscordProtocol
  6. object HeartbeatACK extends EagerGatewayMessage[NotUsed] with Product with Serializable

    Sent by the gateway as a response to Heartbeat.

  7. object IdentifyData extends Serializable
  8. object Reconnect extends EagerGatewayMessage[NotUsed] with Product with Serializable

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

Ungrouped