From 52c72be0728bb5e8c5364b414bf1300a3416d606 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Wed, 8 May 2024 15:38:17 +0100 Subject: [PATCH] Add resume_gateway_url to Nostrum.Struct.Event.Ready --- lib/nostrum/struct/event/ready.ex | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/nostrum/struct/event/ready.ex b/lib/nostrum/struct/event/ready.ex index 7680dcf1e..558548512 100644 --- a/lib/nostrum/struct/event/ready.ex +++ b/lib/nostrum/struct/event/ready.ex @@ -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. @@ -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}``. @@ -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