p

ackcord

gateway

package gateway

Source
package.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]) 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. 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. type GatewayIntents = gateway.GatewayIntents.GatewayIntents
  7. implicit final class GatewayIntentsSyntax extends AnyVal
  8. class GatewayJsonException extends Exception
  9. sealed trait GatewayMessage[+D] extends AnyRef

    Base trait for all gateway messages.

  10. sealed abstract class GatewayOpCode extends IntEnumEntry

    All the different opcodes used by the gateway.

  11. class GatewayRatelimitedException extends Exception
  12. case class GatewaySettings(token: String, largeThreshold: Int = 50, shardNum: Int = 0, shardTotal: Int = 1, idleSince: Option[Instant] = None, activities: Option[Seq[RawActivity]] = None, status: PresenceStatus = PresenceStatus.Online, afk: Boolean = false, guildSubscriptions: Boolean = true, intents: GatewayIntents = GatewayIntents.AllNonPrivileged, compress: Compress = Compress.ZLibStreamCompress) 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

    guildSubscriptions

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

    intents

    Sets which events the gateway should send to the bot.

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

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

    Sent by the gateway as a response to Identify

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

    heartbeatInterval

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

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

    Sent by the shard to log in.

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

    guildSubscriptions

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

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

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

  20. case class RequestGuildMembersData(guildId: Either[Seq[GuildId], GuildId], query: Option[String] = None, limit: Int = 0, 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.

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

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

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

  23. case class StatusData(since: Option[Instant], activities: Option[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.

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

    Sent when a presence or status changes.

  25. case class UnknownGatewayMessage(op: GatewayOpCode) extends EagerGatewayMessage[NotUsed] with Product with Serializable

    All unknown gateway messages.

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

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

    Sent by the bot to connect to a voice channel.

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

Value Members

  1. object Compress
  2. object GatewayEvent
  3. object GatewayHandler
  4. object GatewayHandlerGraphStage
  5. object GatewayIntents
  6. object GatewayOpCode extends IntEnum[GatewayOpCode] with IntCirceEnumWithUnknown[GatewayOpCode]
  7. object GatewayProtocol extends DiscordProtocol
  8. case object HeartbeatACK extends EagerGatewayMessage[NotUsed] with Product with Serializable

    Sent by the gateway as a response to Heartbeat.

  9. object IdentifyData extends Serializable
  10. case object Reconnect extends EagerGatewayMessage[NotUsed] with Product with Serializable

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

Inherited from AnyRef

Inherited from Any

Ungrouped