Skip to content

Commit

Permalink
Merge pull request #588 from Kraigie/jb3/resume-url-debug
Browse files Browse the repository at this point in the history
Add resume_gateway_url to Nostrum.Struct.Event.Ready
  • Loading branch information
jchristgit authored May 8, 2024
2 parents 2c5b743 + 52c72be commit ec78a84
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lib/nostrum/struct/event/ready.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule Nostrum.Struct.Event.Ready do
alias Nostrum.Struct.User
alias Nostrum.Util

defstruct [:v, :user, :guilds, :session_id, :shard, :application]
defstruct [:v, :user, :guilds, :session_id, :shard, :application, :resume_gateway_url]

@typedoc """
Gateway version.
Expand All @@ -29,6 +29,15 @@ defmodule Nostrum.Struct.Event.Ready do
"""
@type session_id :: String.t()

@typedoc """
Similar to `t: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.
"""
@type resume_gateway_url :: String.t()

@typedoc """
A pair of two integers ``{shard_id, num_shards}``.
Expand All @@ -47,7 +56,8 @@ defmodule Nostrum.Struct.Event.Ready do
guilds: guilds,
session_id: session_id,
shard: shard,
application: application
application: application,
resume_gateway_url: resume_gateway_url
}

@doc false
Expand Down

0 comments on commit ec78a84

Please sign in to comment.