From 84df3b9c5b1aac4abb54e79986bac79b1ca2111d Mon Sep 17 00:00:00 2001 From: CloudTheWolf Date: Sat, 9 Dec 2023 21:52:39 +0000 Subject: [PATCH] #1 Shared\Packages - Update to DSharpPlus 5 Nightly --- .../BotTests.cs | 76 ------------------- ...DSharpPlus.Scaffolding.Shared.Tests.csproj | 38 ---------- .../ShardBotTests.cs | 76 ------------------- .../Usings.cs | 10 --- ...dTheWolf.DSharpPlus.Scaffolding.Shared.sln | 6 -- ...eWolf.DSharpPlus.Scaffolding.Shared.csproj | 18 ++--- 6 files changed, 9 insertions(+), 215 deletions(-) delete mode 100644 CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests/BotTests.cs delete mode 100644 CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests/CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests.csproj delete mode 100644 CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests/ShardBotTests.cs delete mode 100644 CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests/Usings.cs diff --git a/CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests/BotTests.cs b/CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests/BotTests.cs deleted file mode 100644 index 1801609..0000000 --- a/CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests/BotTests.cs +++ /dev/null @@ -1,76 +0,0 @@ -namespace CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests -{ - using global::DSharpPlus; - using Microsoft.Extensions.Logging; - - public class Bot : IBot - { - public DiscordClient Client { get; set; } - - public DiscordRestClient Rest { get; set; } - - public CommandsNextExtension Commands { get; set; } - - public InteractivityExtension Interactivity { get; set; } - - public VoiceNextExtension Voice { get; set; } - - public LavalinkConfiguration LavalinkConfig { get; set; } - - public SlashCommandsExtension SlashCommandsExt { get; set; } - - public static DiscordConfiguration DiscordConfig = new () - { - Token = "super-secret-token-owo", - TokenType = TokenType.Bot, - AutoReconnect = true, - MinimumLogLevel = LogLevel.Debug, - }; - } - - [TestFixture] - public class BotTests - { - [Test] - public void Test_ValidateBot() - { - // Arrange - var client = new DiscordShardedClient(ShardBot.DiscordConfig); - var rest = new DiscordRestClient(ShardBot.DiscordConfig); - var commands = new Dictionary(); - var interactivity = new Dictionary(); - var voice = new Dictionary(); - var lavalink = new Dictionary(); - var slashCommands = new Dictionary(); - - var bot = new ShardBot - { - Client = client, - Rest = rest, - Commands = commands, - Interactivity = interactivity, - Voice = voice, - LavalinkConfig = lavalink, - SlashCommandsExt = slashCommands - }; - - // Act - var actualClient = bot.Client; - var actualRest = bot.Rest; - var actualCommands = bot.Commands; - var actualInteractivity = bot.Interactivity; - var actualVoice = bot.Voice; - var actualLavalink = bot.LavalinkConfig; - var actualSlashCommands = bot.SlashCommandsExt; - - // Assert - Assert.Equals(client, actualClient); - Assert.Equals(rest, actualRest); - Assert.Equals(commands, actualCommands); - Assert.Equals(interactivity, actualInteractivity); - Assert.Equals(voice, actualVoice); - Assert.Equals(lavalink, actualLavalink); - Assert.Equals(slashCommands, actualSlashCommands); - } - } -} \ No newline at end of file diff --git a/CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests/CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests.csproj b/CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests/CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests.csproj deleted file mode 100644 index b57e7f2..0000000 --- a/CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests/CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests.csproj +++ /dev/null @@ -1,38 +0,0 @@ - - - - net6.0 - enable - enable - - false - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - diff --git a/CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests/ShardBotTests.cs b/CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests/ShardBotTests.cs deleted file mode 100644 index 96a6371..0000000 --- a/CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests/ShardBotTests.cs +++ /dev/null @@ -1,76 +0,0 @@ -namespace CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests -{ - using global::DSharpPlus; - using Microsoft.Extensions.Logging; - - public class ShardBot : IShardBot - { - public DiscordShardedClient Client { get; set; } - - public DiscordRestClient Rest { get; set; } - - public IReadOnlyDictionary Commands { get; set; } - - public IReadOnlyDictionary Interactivity { get; set; } - - public IReadOnlyDictionary Voice { get; set; } - - public IReadOnlyDictionary LavalinkConfig { get; set; } - - public IReadOnlyDictionary SlashCommandsExt { get; set; } - - public static DiscordConfiguration DiscordConfig = new () - { - Token = "super-secret-token-owo", - TokenType = TokenType.Bot, - AutoReconnect = true, - MinimumLogLevel = LogLevel.Debug, - }; - } - - [TestFixture] - public class ShardBotTests - { - [Test] - public void Test_ValidateSharedBot() - { - // Arrange - var client = new DiscordShardedClient(ShardBot.DiscordConfig); - var rest = new DiscordRestClient(ShardBot.DiscordConfig); - var commands = new Dictionary(); - var interactivity = new Dictionary(); - var voice = new Dictionary(); - var lavalink = new Dictionary(); - var slashCommands = new Dictionary(); - - var bot = new ShardBot - { - Client = client, - Rest = rest, - Commands = commands, - Interactivity = interactivity, - Voice = voice, - LavalinkConfig = lavalink, - SlashCommandsExt = slashCommands - }; - - // Act - var actualClient = bot.Client; - var actualRest = bot.Rest; - var actualCommands = bot.Commands; - var actualInteractivity = bot.Interactivity; - var actualVoice = bot.Voice; - var actualLavalink = bot.LavalinkConfig; - var actualSlashCommands = bot.SlashCommandsExt; - - // Assert - Assert.Equals(client, actualClient); - Assert.Equals(rest, actualRest); - Assert.Equals(commands, actualCommands); - Assert.Equals(interactivity, actualInteractivity); - Assert.Equals(voice, actualVoice); - Assert.Equals(lavalink, actualLavalink); - Assert.Equals(slashCommands, actualSlashCommands); - } - } -} \ No newline at end of file diff --git a/CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests/Usings.cs b/CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests/Usings.cs deleted file mode 100644 index 2bafb7b..0000000 --- a/CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests/Usings.cs +++ /dev/null @@ -1,10 +0,0 @@ - -global using DSharpPlus; -global using DSharpPlus.Interactivity; -global using DSharpPlus.Lavalink; -global using DSharpPlus.SlashCommands; -global using Moq; -global using NUnit.Framework; -global using DSharpPlus.CommandsNext; -global using DSharpPlus.VoiceNext; -global using CloudTheWolf.DSharpPlus.Scaffolding.Shared.Interfaces; \ No newline at end of file diff --git a/CloudTheWolf.DSharpPlus.Scaffolding.Shared.sln b/CloudTheWolf.DSharpPlus.Scaffolding.Shared.sln index 5dd74df..26949e3 100644 --- a/CloudTheWolf.DSharpPlus.Scaffolding.Shared.sln +++ b/CloudTheWolf.DSharpPlus.Scaffolding.Shared.sln @@ -5,8 +5,6 @@ VisualStudioVersion = 17.0.31606.5 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudTheWolf.DSharpPlus.Scaffolding.Shared", "CloudTheWolf.DSharpPlus.Scaffolding.Shared\CloudTheWolf.DSharpPlus.Scaffolding.Shared.csproj", "{FA98CAD9-B490-4C4E-AAA8-B755A6DDD3F6}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests", "CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests\CloudTheWolf.DSharpPlus.Scaffolding.Shared.Tests.csproj", "{0E3D2790-DB28-4BF5-BBB0-843B73A35457}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -17,10 +15,6 @@ Global {FA98CAD9-B490-4C4E-AAA8-B755A6DDD3F6}.Debug|Any CPU.Build.0 = Debug|Any CPU {FA98CAD9-B490-4C4E-AAA8-B755A6DDD3F6}.Release|Any CPU.ActiveCfg = Release|Any CPU {FA98CAD9-B490-4C4E-AAA8-B755A6DDD3F6}.Release|Any CPU.Build.0 = Release|Any CPU - {0E3D2790-DB28-4BF5-BBB0-843B73A35457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0E3D2790-DB28-4BF5-BBB0-843B73A35457}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0E3D2790-DB28-4BF5-BBB0-843B73A35457}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0E3D2790-DB28-4BF5-BBB0-843B73A35457}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/CloudTheWolf.DSharpPlus.Scaffolding.Shared/CloudTheWolf.DSharpPlus.Scaffolding.Shared.csproj b/CloudTheWolf.DSharpPlus.Scaffolding.Shared/CloudTheWolf.DSharpPlus.Scaffolding.Shared.csproj index 37c0ffa..5c1b829 100644 --- a/CloudTheWolf.DSharpPlus.Scaffolding.Shared/CloudTheWolf.DSharpPlus.Scaffolding.Shared.csproj +++ b/CloudTheWolf.DSharpPlus.Scaffolding.Shared/CloudTheWolf.DSharpPlus.Scaffolding.Shared.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 embedded True True @@ -10,7 +10,7 @@ © 2021 CloudTheWolf Ltd Shared Interfaces for CloudTheWolf.DSharpPlus.Scaffolding Apache-2.0 - 2.1.1.2 + 3.0.0.1 $(AssemblyVersion) $(AssemblyVersion)-beta logo.png @@ -21,13 +21,13 @@ - - - - - - - + + + + + + +