View Source Nostrum.Struct.Event.Ready (Nostrum v0.10.0)

Sent after initial handshake with the gateway

Summary

Types

Partial application object with id and flags

The guilds that the bot user is in

Similar to session_id/0, this is the URL that Discord has requested reconnection attempts to be made against.

Used for resuming connections.

A pair of two integers {shard_id, num_shards}.

t()

Event sent after initial handshake with the gateway

Information about the bot user

Types

Link to this type

application()

View Source (since 0.5.0)

Partial application object with id and flags

Link to this type

guilds()

View Source (since 0.5.0)

The guilds that the bot user is in

Link to this type

resume_gateway_url()

View Source (since 0.5.0)
@type resume_gateway_url() :: String.t()

Similar to session_id/0, this is the URL that Discord has requested reconnection attempts to be made against.

Nostrum stores and handles this for you, this value is provided for debugging purposes.

Link to this type

session_id()

View Source (since 0.5.0)
@type session_id() :: String.t()

Used for resuming connections.

If you are wondering whether you need to use this, you probably don't. Nostrum handles reconnections for you.

@type shard() :: {integer(), non_neg_integer()} | nil

A pair of two integers {shard_id, num_shards}.

For more information, see https://discord.com/developers/docs/topics/gateway#sharding.

@type t() :: %Nostrum.Struct.Event.Ready{
  application: application(),
  guilds: guilds(),
  resume_gateway_url: resume_gateway_url(),
  session_id: session_id(),
  shard: shard(),
  user: user(),
  v: v()
}

Event sent after initial handshake with the gateway

@type user() :: Nostrum.Struct.User.t()

Information about the bot user

@type v() :: non_neg_integer()

Gateway version. See https://discord.com/developers/docs/topics/gateway#gateways-gateway-versions