diff --git a/src/Discord.Net.Core/Discord.Net.Core.csproj b/src/Discord.Net.Core/Discord.Net.Core.csproj index 64ad2229d..3de56281f 100644 --- a/src/Discord.Net.Core/Discord.Net.Core.csproj +++ b/src/Discord.Net.Core/Discord.Net.Core.csproj @@ -8,7 +8,7 @@ net461;netstandard2.0;netstandard2.1 netstandard2.0;netstandard2.1 Discord.Net.Labs.Core - 2.3.5 + 2.3.6 Discord.Net.Labs.Core https://github.com/Discord-Net-Labs/Discord.Net-Labs Temporary.png diff --git a/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj b/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj index 62d245c4e..b09197875 100644 --- a/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj +++ b/src/Discord.Net.WebSocket/Discord.Net.WebSocket.csproj @@ -8,7 +8,7 @@ net461;netstandard2.0;netstandard2.1 netstandard2.0;netstandard2.1 true - 2.3.5 + 2.3.6 https://github.com/Discord-Net-Labs/Discord.Net-Labs https://github.com/Discord-Net-Labs/Discord.Net-Labs Temporary.png diff --git a/src/Discord.Net.WebSocket/DiscordSocketClient.cs b/src/Discord.Net.WebSocket/DiscordSocketClient.cs index f4a862998..ef696a5ba 100644 --- a/src/Discord.Net.WebSocket/DiscordSocketClient.cs +++ b/src/Discord.Net.WebSocket/DiscordSocketClient.cs @@ -1796,25 +1796,27 @@ namespace Discord.WebSocket channel = State.GetDMChannel(data.User.Value.Id); } - if(channel == null) + if(channel is ISocketMessageChannel textChannel) { - await UnknownChannelAsync(type, data.ChannelId.Value).ConfigureAwait(false); - return; - } + var guild = (channel as SocketGuildChannel)?.Guild; + if (guild != null && !guild.IsSynced) + { + await UnsyncedGuildAsync(type, guild.Id).ConfigureAwait(false); + return; + } - var guild = (channel as SocketGuildChannel)?.Guild; - if (guild != null && !guild.IsSynced) + var interaction = SocketInteraction.Create(this, data, channel as ISocketMessageChannel); + + if (this.AlwaysAcknowledgeInteractions) + await interaction.AcknowledgeAsync().ConfigureAwait(false); + + await TimedInvokeAsync(_interactionCreatedEvent, nameof(InteractionCreated), interaction).ConfigureAwait(false); + } + else { - await UnsyncedGuildAsync(type, guild.Id).ConfigureAwait(false); + await UnknownChannelAsync(type, data.ChannelId.Value).ConfigureAwait(false); return; } - - var interaction = SocketInteraction.Create(this, data, channel as ISocketMessageChannel); - - if (this.AlwaysAcknowledgeInteractions) - await interaction.AcknowledgeAsync().ConfigureAwait(false); - - await TimedInvokeAsync(_interactionCreatedEvent, nameof(InteractionCreated), interaction).ConfigureAwait(false); } break; case "APPLICATION_COMMAND_CREATE": diff --git a/src/Discord.Net/Discord.Net.nuspec b/src/Discord.Net/Discord.Net.nuspec index d1591cc80..0a6fa257f 100644 --- a/src/Discord.Net/Discord.Net.nuspec +++ b/src/Discord.Net/Discord.Net.nuspec @@ -2,7 +2,7 @@ Discord.Net.Labs - 2.3.4$suffix$ + 2.3.5$suffix$ Discord.Net Labs Discord.Net Contributors quinchs @@ -14,23 +14,23 @@ https://avatars.githubusercontent.com/u/84047264 - + - + - + - + - + - +