From 59308807087e314a59aaac2eb3518af2646ac697 Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Wed, 25 Oct 2023 17:53:23 +0200 Subject: [PATCH] Update DiscordClient.Dispatch.cs --- DisCatSharp/Clients/DiscordClient.Dispatch.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DisCatSharp/Clients/DiscordClient.Dispatch.cs b/DisCatSharp/Clients/DiscordClient.Dispatch.cs index 6ee294a63f..723cd04271 100644 --- a/DisCatSharp/Clients/DiscordClient.Dispatch.cs +++ b/DisCatSharp/Clients/DiscordClient.Dispatch.cs @@ -92,12 +92,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 ?? false) || (this.Configuration?.EnablePayloadReceivedEvent ?? false)) + await this._payloadReceived.InvokeAsync(this, new(this.ServiceProvider) + { + EventName = payload.EventName, + PayloadObject = dat + }).ConfigureAwait(false); #region Default objects