@@ -8,7 +8,7 @@ | |||||
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net461;netstandard2.0;netstandard2.1</TargetFrameworks> | <TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net461;netstandard2.0;netstandard2.1</TargetFrameworks> | ||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0;netstandard2.1</TargetFrameworks> | <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0;netstandard2.1</TargetFrameworks> | ||||
<PackageId>Discord.Net.Labs.Core</PackageId> | <PackageId>Discord.Net.Labs.Core</PackageId> | ||||
<Version>2.3.5</Version> | |||||
<Version>2.3.6</Version> | |||||
<Product>Discord.Net.Labs.Core</Product> | <Product>Discord.Net.Labs.Core</Product> | ||||
<RepositoryUrl>https://github.com/Discord-Net-Labs/Discord.Net-Labs</RepositoryUrl> | <RepositoryUrl>https://github.com/Discord-Net-Labs/Discord.Net-Labs</RepositoryUrl> | ||||
<PackageIcon>Temporary.png</PackageIcon> | <PackageIcon>Temporary.png</PackageIcon> | ||||
@@ -8,7 +8,7 @@ | |||||
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net461;netstandard2.0;netstandard2.1</TargetFrameworks> | <TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">net461;netstandard2.0;netstandard2.1</TargetFrameworks> | ||||
<TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0;netstandard2.1</TargetFrameworks> | <TargetFrameworks Condition=" '$(OS)' != 'Windows_NT' ">netstandard2.0;netstandard2.1</TargetFrameworks> | ||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | <AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||||
<Version>2.3.5</Version> | |||||
<Version>2.3.6</Version> | |||||
<RepositoryUrl>https://github.com/Discord-Net-Labs/Discord.Net-Labs</RepositoryUrl> | <RepositoryUrl>https://github.com/Discord-Net-Labs/Discord.Net-Labs</RepositoryUrl> | ||||
<PackageProjectUrl>https://github.com/Discord-Net-Labs/Discord.Net-Labs</PackageProjectUrl> | <PackageProjectUrl>https://github.com/Discord-Net-Labs/Discord.Net-Labs</PackageProjectUrl> | ||||
<PackageIcon>Temporary.png</PackageIcon> | <PackageIcon>Temporary.png</PackageIcon> | ||||
@@ -1796,25 +1796,27 @@ namespace Discord.WebSocket | |||||
channel = State.GetDMChannel(data.User.Value.Id); | 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; | 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; | break; | ||||
case "APPLICATION_COMMAND_CREATE": | case "APPLICATION_COMMAND_CREATE": | ||||
@@ -2,7 +2,7 @@ | |||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | ||||
<metadata> | <metadata> | ||||
<id>Discord.Net.Labs</id> | <id>Discord.Net.Labs</id> | ||||
<version>2.3.4$suffix$</version> | |||||
<version>2.3.5$suffix$</version> | |||||
<title>Discord.Net Labs</title> | <title>Discord.Net Labs</title> | ||||
<authors>Discord.Net Contributors</authors> | <authors>Discord.Net Contributors</authors> | ||||
<owners>quinchs</owners> | <owners>quinchs</owners> | ||||
@@ -14,23 +14,23 @@ | |||||
<iconUrl>https://avatars.githubusercontent.com/u/84047264</iconUrl> | <iconUrl>https://avatars.githubusercontent.com/u/84047264</iconUrl> | ||||
<dependencies> | <dependencies> | ||||
<group targetFramework="net461"> | <group targetFramework="net461"> | ||||
<dependency id="Discord.Net.Labs.Core" version="2.3.5$suffix$" /> | |||||
<dependency id="Discord.Net.Labs.Core" version="2.3.6$suffix$" /> | |||||
<dependency id="Discord.Net.Labs.Rest" version="2.3.6$suffix$" /> | <dependency id="Discord.Net.Labs.Rest" version="2.3.6$suffix$" /> | ||||
<dependency id="Discord.Net.Labs.WebSocket" version="2.3.5$suffix$" /> | |||||
<dependency id="Discord.Net.Labs.WebSocket" version="2.3.6$suffix$" /> | |||||
<dependency id="Discord.Net.Labs.Commands" version="2.3.2$suffix$" /> | <dependency id="Discord.Net.Labs.Commands" version="2.3.2$suffix$" /> | ||||
<dependency id="Discord.Net.Labs.Webhook" version="2.3.1$suffix$" /> | <dependency id="Discord.Net.Labs.Webhook" version="2.3.1$suffix$" /> | ||||
</group> | </group> | ||||
<group targetFramework="netstandard2.0"> | <group targetFramework="netstandard2.0"> | ||||
<dependency id="Discord.Net.Labs.Core" version="2.3.5$suffix$" /> | |||||
<dependency id="Discord.Net.Labs.Core" version="2.3.6$suffix$" /> | |||||
<dependency id="Discord.Net.Labs.Rest" version="2.3.6$suffix$" /> | <dependency id="Discord.Net.Labs.Rest" version="2.3.6$suffix$" /> | ||||
<dependency id="Discord.Net.Labs.WebSocket" version="2.3.5$suffix$" /> | |||||
<dependency id="Discord.Net.Labs.WebSocket" version="2.3.6$suffix$" /> | |||||
<dependency id="Discord.Net.Labs.Commands" version="2.3.2$suffix$" /> | <dependency id="Discord.Net.Labs.Commands" version="2.3.2$suffix$" /> | ||||
<dependency id="Discord.Net.Labs.Webhook" version="2.3.1$suffix$" /> | <dependency id="Discord.Net.Labs.Webhook" version="2.3.1$suffix$" /> | ||||
</group> | </group> | ||||
<group targetFramework="netstandard2.1"> | <group targetFramework="netstandard2.1"> | ||||
<dependency id="Discord.Net.Labs.Core" version="2.3.5$suffix$" /> | |||||
<dependency id="Discord.Net.Labs.Core" version="2.3.6$suffix$" /> | |||||
<dependency id="Discord.Net.Labs.Rest" version="2.3.6$suffix$" /> | <dependency id="Discord.Net.Labs.Rest" version="2.3.6$suffix$" /> | ||||
<dependency id="Discord.Net.Labs.WebSocket" version="2.3.5$suffix$" /> | |||||
<dependency id="Discord.Net.Labs.WebSocket" version="2.3.6$suffix$" /> | |||||
<dependency id="Discord.Net.Labs.Commands" version="2.3.2$suffix$" /> | <dependency id="Discord.Net.Labs.Commands" version="2.3.2$suffix$" /> | ||||
<dependency id="Discord.Net.Labs.Webhook" version="2.3.1$suffix$" /> | <dependency id="Discord.Net.Labs.Webhook" version="2.3.1$suffix$" /> | ||||
</group> | </group> | ||||