Skip to content

Commit

Permalink
docs~
Browse files Browse the repository at this point in the history
  • Loading branch information
Lulalaby committed Sep 10, 2023
1 parent 0ff7c89 commit 450cd37
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
26 changes: 20 additions & 6 deletions DisCatSharp/Clients/DiscordClient.Dispatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,24 @@ public sealed partial class DiscordClient
{
#region Private Fields

/// <summary>
/// Gets the resume gateway url.
/// </summary>
private string? _resumeGatewayUrl;

/// <summary>
/// Gets the session id.
/// </summary>
private string? _sessionId;

/// <summary>
/// Gets whether the guild download was completed.
/// </summary>
private bool _guildDownloadCompleted;

/// <summary>
/// Gets the temp timers.
/// </summary>
private readonly Dictionary<string, KeyValuePair<TimeoutHandler, Timer>> _tempTimers = new();

/// <summary>
Expand Down Expand Up @@ -116,12 +130,12 @@ internal async Task HandleDispatchAsync(GatewayPayload payload)
return;
}

/*await this._payloadReceived.InvokeAsync(this, new(this.ServiceProvider)
{
EventName = payload.EventName,
PayloadObject = dat
}).ConfigureAwait(false);
*/
if (this.Configuration.EnableLibraryDeveloperMode)
await this._payloadReceived.InvokeAsync(this, new(this.ServiceProvider)
{
EventName = payload.EventName,
PayloadObject = dat
}).ConfigureAwait(false);

#region Default objects

Expand Down
10 changes: 8 additions & 2 deletions DisCatSharp/EventArgs/PayloadReceivedEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ public string Json
}
}

/// <summary>
/// Gets the json.
/// </summary>
private string _json;

/// <summary>
/// Gets or sets the payload object.
/// </summary>
Expand All @@ -53,10 +57,12 @@ public string Json
/// <summary>
/// The name of this event.
/// </summary>
public string EventName { get; internal set; }
public string? EventName { get; internal set; }

/// <summary>
/// Initializes a new instance of the <see cref="PayloadReceivedEventArgs"/> class.
/// </summary>
internal PayloadReceivedEventArgs(IServiceProvider provider) : base(provider) { }
internal PayloadReceivedEventArgs(IServiceProvider provider)
: base(provider)
{ }
}

0 comments on commit 450cd37

Please sign in to comment.