diff --git a/DisCatSharp/Clients/DiscordClient.cs b/DisCatSharp/Clients/DiscordClient.cs index 12f227029c..950daa14d1 100644 --- a/DisCatSharp/Clients/DiscordClient.cs +++ b/DisCatSharp/Clients/DiscordClient.cs @@ -1488,7 +1488,7 @@ private DiscordUser UpdateUser(DiscordUser usr, ulong? guildId, DiscordGuild? gu /// The raw events. private void UpdateCachedScheduledEvent(DiscordGuild guild, JArray? rawEvents) { - ObjectDisposedException.ThrowIf(true, this._disposed); + ObjectDisposedException.ThrowIf(this._disposed, this); if (rawEvents is not null) { @@ -1512,7 +1512,7 @@ private void UpdateCachedScheduledEvent(DiscordGuild guild, JArray? rawEvents) /// The raw members. private void UpdateCachedGuild(DiscordGuild newGuild, JArray? rawMembers) { - ObjectDisposedException.ThrowIf(true, this._disposed); + ObjectDisposedException.ThrowIf(this._disposed, this); this.GuildsInternal.TryAdd(newGuild.Id, newGuild); @@ -1685,7 +1685,7 @@ private void PopulateMessageReactionsAndCache(DiscordMessage message, TransportU /// public override void Dispose() { - ObjectDisposedException.ThrowIf(true, this._disposed); + ObjectDisposedException.ThrowIf(this._disposed, this); this._disposed = true; GC.SuppressFinalize(this);