Add net8.0 and net9.0 (#3032)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="../../Discord.Net.targets" />
|
||||
<Import Project="../../StyleAnalyzer.targets" />
|
||||
<PropertyGroup>
|
||||
<AssemblyName>Discord.Net.Commands</AssemblyName>
|
||||
<RootNamespace>Discord.Commands</RootNamespace>
|
||||
<Description>A Discord.Net extension adding support for bot commands.</Description>
|
||||
<TargetFrameworks>net6.0;net5.0;net461;netstandard2.0;netstandard2.1</TargetFrameworks>
|
||||
<TargetFrameworks>net9.0;net8.0;net6.0;net5.0;net461;netstandard2.0;netstandard2.1;</TargetFrameworks>
|
||||
<WarningLevel>5</WarningLevel>
|
||||
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
|
||||
<IsTrimmable>false</IsTrimmable>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="../../Discord.Net.targets" />
|
||||
<Import Project="../../StyleAnalyzer.targets" />
|
||||
<PropertyGroup>
|
||||
<AssemblyName>Discord.Net.Core</AssemblyName>
|
||||
<RootNamespace>Discord</RootNamespace>
|
||||
<Description>The core components for the Discord.Net library.</Description>
|
||||
<TargetFrameworks>net6.0;net5.0;net461;netstandard2.0;netstandard2.1</TargetFrameworks>
|
||||
<TargetFrameworks>net9.0;net8.0;net6.0;net5.0;net461;netstandard2.0;netstandard2.1</TargetFrameworks>
|
||||
<WarningLevel>5</WarningLevel>
|
||||
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
|
||||
<IsTrimmable>false</IsTrimmable>
|
||||
@@ -16,9 +16,9 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="System.Interactive.Async" Version="6.0.1" />
|
||||
<PackageReference Include="System.Collections.Immutable" Version="6.0.0" />
|
||||
<PackageReference Include="System.Collections.Immutable" Version="9.0.0" />
|
||||
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
|
||||
<PackageReference Include="IDisposableAnalyzers" Version="4.0.7">
|
||||
<PackageReference Include="IDisposableAnalyzers" Version="4.0.8">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -142,14 +142,14 @@ public readonly struct MemberSearchV2QueryProperties
|
||||
|
||||
public MemberSearchV2QueryProperties(Dictionary<int, string> andQuery, Dictionary<int, string> orQuery)
|
||||
{
|
||||
AndQuery = andQuery.Select(x => new KeyValuePair<int, object>(x.Key, x.Value)).ToDictionary();
|
||||
OrQuery = orQuery.Select(x => new KeyValuePair<int, object>(x.Key, x.Value)).ToDictionary();
|
||||
AndQuery = andQuery.Select(x => new KeyValuePair<int, object>(x.Key, x.Value)).ToDictionary(x => x.Key, y => y.Value);
|
||||
OrQuery = orQuery.Select(x => new KeyValuePair<int, object>(x.Key, x.Value)).ToDictionary(x => x.Key, y => y.Value);
|
||||
}
|
||||
|
||||
public MemberSearchV2QueryProperties(Dictionary<int, long> andQuery, Dictionary<int, long> orQuery)
|
||||
{
|
||||
AndQuery = andQuery.Select(x => new KeyValuePair<int, object>(x.Key, x.Value)).ToDictionary();
|
||||
OrQuery = orQuery.Select(x => new KeyValuePair<int, object>(x.Key, x.Value)).ToDictionary();
|
||||
AndQuery = andQuery.Select(x => new KeyValuePair<int, object>(x.Key, x.Value)).ToDictionary(x => x.Key, y => y.Value);
|
||||
OrQuery = orQuery.Select(x => new KeyValuePair<int, object>(x.Key, x.Value)).ToDictionary(x => x.Key, y => y.Value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
@@ -15,7 +15,7 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Discord.Net.Core\Discord.Net.Core.csproj" />
|
||||
<ProjectReference Include="..\Discord.Net.WebSocket\Discord.Net.WebSocket.csproj" />
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2023.3.0" />
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="../../Discord.Net.targets" />
|
||||
<Import Project="../../StyleAnalyzer.targets" />
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net6.0;net5.0;net461;netstandard2.0;netstandard2.1</TargetFrameworks>
|
||||
<TargetFrameworks>net9.0;net8.0;net6.0;net5.0;net461;netstandard2.0;netstandard2.1;</TargetFrameworks>
|
||||
<RootNamespace>Discord.Interactions</RootNamespace>
|
||||
<AssemblyName>Discord.Net.Interactions</AssemblyName>
|
||||
<Description>A Discord.Net extension adding support for Application Commands.</Description>
|
||||
@@ -20,9 +20,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
|
||||
<PackageReference Include="System.Collections.Immutable" Version="6.0.0" />
|
||||
<PackageReference Include="System.Reactive" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.0" />
|
||||
<PackageReference Include="System.Collections.Immutable" Version="9.0.0" />
|
||||
<PackageReference Include="System.Reactive" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="$(TargetFramework.StartsWith('net4')) AND '$(MSBuildRuntimeType)' == 'Core' AND '$(OS)' != 'Windows_NT'">
|
||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
|
||||
|
||||
@@ -83,8 +83,8 @@ namespace Discord.API
|
||||
Type = cmd.Type;
|
||||
Description = cmd.Description;
|
||||
|
||||
NameLocalizations = cmd.NameLocalizations?.ToDictionary() ?? Optional<Dictionary<string, string>>.Unspecified;
|
||||
DescriptionLocalizations = cmd.DescriptionLocalizations?.ToDictionary() ?? Optional<Dictionary<string, string>>.Unspecified;
|
||||
NameLocalizations = cmd.NameLocalizations?.ToDictionary(x => x.Key, y => y.Value) ?? Optional<Dictionary<string, string>>.Unspecified;
|
||||
DescriptionLocalizations = cmd.DescriptionLocalizations?.ToDictionary(x => x.Key, y => y.Value) ?? Optional<Dictionary<string, string>>.Unspecified;
|
||||
NameLocalized = cmd.NameLocalized;
|
||||
DescriptionLocalized = cmd.DescriptionLocalized;
|
||||
}
|
||||
@@ -94,7 +94,7 @@ namespace Discord.API
|
||||
{
|
||||
Name = x.Name,
|
||||
Value = x.Value,
|
||||
NameLocalizations = x.NameLocalizations?.ToDictionary() ?? Optional<Dictionary<string, string>>.Unspecified,
|
||||
NameLocalizations = x.NameLocalizations?.ToDictionary(x => x.Key, y => y.Value) ?? Optional<Dictionary<string, string>>.Unspecified,
|
||||
}).ToArray() ?? Optional<ApplicationCommandOptionChoice[]>.Unspecified;
|
||||
|
||||
Options = option.Options?.Select(x => new ApplicationCommandOption(x)).ToArray() ?? Optional<ApplicationCommandOption[]>.Unspecified;
|
||||
@@ -114,8 +114,8 @@ namespace Discord.API
|
||||
Description = option.Description;
|
||||
Autocomplete = option.IsAutocomplete;
|
||||
|
||||
NameLocalizations = option.NameLocalizations?.ToDictionary() ?? Optional<Dictionary<string, string>>.Unspecified;
|
||||
DescriptionLocalizations = option.DescriptionLocalizations?.ToDictionary() ?? Optional<Dictionary<string, string>>.Unspecified;
|
||||
NameLocalizations = option.NameLocalizations?.ToDictionary(x => x.Key, y => y.Value) ?? Optional<Dictionary<string, string>>.Unspecified;
|
||||
DescriptionLocalizations = option.DescriptionLocalizations?.ToDictionary(x => x.Key, y => y.Value) ?? Optional<Dictionary<string, string>>.Unspecified;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,8 +342,8 @@ namespace Discord.Rest
|
||||
Description = x.Description,
|
||||
Key = x.Key,
|
||||
Type = x.Type,
|
||||
NameLocalizations = x.NameLocalizations?.ToDictionary(),
|
||||
DescriptionLocalizations = x.DescriptionLocalizations?.ToDictionary()
|
||||
NameLocalizations = x.NameLocalizations?.ToDictionary(x => x.Key, y => y.Value),
|
||||
DescriptionLocalizations = x.DescriptionLocalizations?.ToDictionary(x => x.Key, y => y.Value)
|
||||
}).ToArray()))
|
||||
.Select(model
|
||||
=> new RoleConnectionMetadata(
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="../../Discord.Net.targets" />
|
||||
<Import Project="../../StyleAnalyzer.targets" />
|
||||
<PropertyGroup>
|
||||
<AssemblyName>Discord.Net.Rest</AssemblyName>
|
||||
<RootNamespace>Discord.Rest</RootNamespace>
|
||||
<Description>A core Discord.Net library containing the REST client and models.</Description>
|
||||
<TargetFrameworks>net6.0;net5.0;net461;netstandard2.0;netstandard2.1</TargetFrameworks>
|
||||
<TargetFrameworks>net9.0;net8.0;net6.0;net5.0;net461;netstandard2.0;netstandard2.1;</TargetFrameworks>
|
||||
<WarningLevel>5</WarningLevel>
|
||||
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
|
||||
<IsTrimmable>false</IsTrimmable>
|
||||
|
||||
@@ -99,8 +99,8 @@ namespace Discord.Rest
|
||||
DefaultPermission = arg.IsDefaultPermission.IsSpecified
|
||||
? arg.IsDefaultPermission.Value
|
||||
: Optional<bool>.Unspecified,
|
||||
NameLocalizations = arg.NameLocalizations?.ToDictionary(),
|
||||
DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(),
|
||||
NameLocalizations = arg.NameLocalizations?.ToDictionary(x => x.Key, y => y.Value),
|
||||
DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(x => x.Key, y => y.Value),
|
||||
|
||||
// TODO: better conversion to nullable optionals
|
||||
DefaultMemberPermission = arg.DefaultMemberPermissions.ToNullable(),
|
||||
@@ -142,8 +142,8 @@ namespace Discord.Rest
|
||||
DefaultPermission = arg.IsDefaultPermission.IsSpecified
|
||||
? arg.IsDefaultPermission.Value
|
||||
: Optional<bool>.Unspecified,
|
||||
NameLocalizations = arg.NameLocalizations?.ToDictionary(),
|
||||
DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(),
|
||||
NameLocalizations = arg.NameLocalizations?.ToDictionary(x => x.Key, y => y.Value),
|
||||
DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(x => x.Key, y => y.Value),
|
||||
|
||||
// TODO: better conversion to nullable optionals
|
||||
DefaultMemberPermission = arg.DefaultMemberPermissions.ToNullable(),
|
||||
@@ -188,8 +188,8 @@ namespace Discord.Rest
|
||||
DefaultPermission = arg.IsDefaultPermission.IsSpecified
|
||||
? arg.IsDefaultPermission.Value
|
||||
: Optional<bool>.Unspecified,
|
||||
NameLocalizations = arg.NameLocalizations?.ToDictionary(),
|
||||
DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(),
|
||||
NameLocalizations = arg.NameLocalizations?.ToDictionary(x => x.Key, y => y.Value),
|
||||
DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(x => x.Key, y => y.Value),
|
||||
|
||||
// TODO: better conversion to nullable optionals
|
||||
DefaultMemberPermission = arg.DefaultMemberPermissions.ToNullable(),
|
||||
@@ -257,8 +257,8 @@ namespace Discord.Rest
|
||||
DefaultPermission = args.IsDefaultPermission.IsSpecified
|
||||
? args.IsDefaultPermission.Value
|
||||
: Optional<bool>.Unspecified,
|
||||
NameLocalizations = args.NameLocalizations?.ToDictionary(),
|
||||
DescriptionLocalizations = args.DescriptionLocalizations?.ToDictionary(),
|
||||
NameLocalizations = args.NameLocalizations?.ToDictionary(x => x.Key, y => y.Value),
|
||||
DescriptionLocalizations = args.DescriptionLocalizations?.ToDictionary(x => x.Key, y => y.Value),
|
||||
Nsfw = args.IsNsfw.GetValueOrDefault(false),
|
||||
DefaultMemberPermission = args.DefaultMemberPermissions.ToNullable(),
|
||||
IntegrationTypes = args.IntegrationTypes,
|
||||
@@ -317,8 +317,8 @@ namespace Discord.Rest
|
||||
DefaultPermission = arg.IsDefaultPermission.IsSpecified
|
||||
? arg.IsDefaultPermission.Value
|
||||
: Optional<bool>.Unspecified,
|
||||
NameLocalizations = arg.NameLocalizations?.ToDictionary(),
|
||||
DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(),
|
||||
NameLocalizations = arg.NameLocalizations?.ToDictionary(x => x.Key, y => y.Value),
|
||||
DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(x => x.Key, y => y.Value),
|
||||
|
||||
// TODO: better conversion to nullable optionals
|
||||
DefaultMemberPermission = arg.DefaultMemberPermissions.ToNullable(),
|
||||
@@ -357,8 +357,8 @@ namespace Discord.Rest
|
||||
DefaultPermission = arg.IsDefaultPermission.IsSpecified
|
||||
? arg.IsDefaultPermission.Value
|
||||
: Optional<bool>.Unspecified,
|
||||
NameLocalizations = arg.NameLocalizations?.ToDictionary(),
|
||||
DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(),
|
||||
NameLocalizations = arg.NameLocalizations?.ToDictionary(x => x.Key, y => y.Value),
|
||||
DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(x => x.Key, y => y.Value),
|
||||
Nsfw = arg.IsNsfw.GetValueOrDefault(false),
|
||||
DefaultMemberPermission = arg.DefaultMemberPermissions.ToNullable()
|
||||
};
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="../../Discord.Net.targets" />
|
||||
<Import Project="../../StyleAnalyzer.targets" />
|
||||
<PropertyGroup>
|
||||
<AssemblyName>Discord.Net.WebSocket</AssemblyName>
|
||||
<RootNamespace>Discord.WebSocket</RootNamespace>
|
||||
<Description>A core Discord.Net library containing the WebSocket client and models.</Description>
|
||||
<TargetFrameworks>net6.0;net5.0;net461;netstandard2.0;netstandard2.1</TargetFrameworks>
|
||||
<TargetFrameworks>net9.0;net8.0;net6.0;net5.0;net461;netstandard2.0;netstandard2.1</TargetFrameworks>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<WarningLevel>5</WarningLevel>
|
||||
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="../../Discord.Net.targets" />
|
||||
<Import Project="../../StyleAnalyzer.targets" />
|
||||
<PropertyGroup>
|
||||
<AssemblyName>Discord.Net.Webhook</AssemblyName>
|
||||
<RootNamespace>Discord.Webhook</RootNamespace>
|
||||
<Description>A core Discord.Net library containing the Webhook client and models.</Description>
|
||||
<TargetFrameworks>net6.0;net5.0;netstandard2.0;netstandard2.1</TargetFrameworks>
|
||||
<TargetFrameworks>net9.0;net8.0;net6.0;net5.0;netstandard2.0;netstandard2.1;</TargetFrameworks>
|
||||
<WarningLevel>5</WarningLevel>
|
||||
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
|
||||
<IsTrimmable>false</IsTrimmable>
|
||||
|
||||
Reference in New Issue
Block a user