From 4bab94b32922bdec14da8c6c3963fbf62dad86c7 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Sat, 27 Apr 2024 22:45:14 +0000 Subject: [PATCH] Namespace changes to make them make sense --- NadekoBot.sln | 2 +- src/Nadeko.Medusa/Attributes/FilterAttribute.cs | 2 +- .../Attributes/MedusaPermAttribute.cs | 2 +- .../Attributes/bot_owner_onlyAttribute.cs | 2 +- .../Attributes/bot_permAttribute.cs | 2 +- src/Nadeko.Medusa/Attributes/cmdAttribute.cs | 2 +- src/Nadeko.Medusa/Attributes/injectAttribute.cs | 2 +- .../Attributes/leftoverAttribute.cs | 2 +- src/Nadeko.Medusa/Attributes/prioAttribute.cs | 2 +- src/Nadeko.Medusa/Attributes/svcAttribute.cs | 2 +- .../Attributes/user_permAttribute.cs | 2 +- src/Nadeko.Medusa/Context/AnyContext.cs | 2 +- src/Nadeko.Medusa/Context/DmContext.cs | 2 +- src/Nadeko.Medusa/Context/GuildContext.cs | 2 +- .../Extensions/EmbedBuilderExtensions.cs | 2 +- src/Nadeko.Medusa/Extensions/MedusaExtensions.cs | 3 +-- src/Nadeko.Medusa/Nadeko.Medusa.csproj | 2 +- src/Nadeko.Medusa/ParamParser/ParamParser.cs | 2 +- src/Nadeko.Medusa/ParamParser/ParseResult.cs | 2 +- src/Nadeko.Medusa/Snek.cs | 2 +- src/Nadeko.Medusa/Strings/CommandStrings.cs | 2 +- src/Nadeko.Medusa/Strings/IMedusaStrings.cs | 2 +- .../Strings/IMedusaStringsProvider.cs | 2 +- .../Strings/LocalMedusaStringsProvider.cs | 2 +- src/Nadeko.Medusa/Strings/MedusaStrings.cs | 2 +- src/Nadeko.Medusa/Strings/StringsLoader.cs | 2 +- src/{ayu => }/NadekoBot.Voice/CloseCodes.cs | 0 src/{ayu => }/NadekoBot.Voice/LibOpus.cs | 0 src/{ayu => }/NadekoBot.Voice/LibSodium.cs | 0 .../NadekoBot.Voice/Models/SelectProtocol.cs | 0 .../NadekoBot.Voice/Models/VoiceHello.cs | 0 .../NadekoBot.Voice/Models/VoiceIdentify.cs | 0 .../NadekoBot.Voice/Models/VoicePayload.cs | 0 .../NadekoBot.Voice/Models/VoiceReady.cs | 0 .../NadekoBot.Voice/Models/VoiceResume.cs | 0 .../Models/VoiceSessionDescription.cs | 0 .../NadekoBot.Voice/Models/VoiceSpeaking.cs | 0 .../NadekoBot.Voice/NadekoBot.Voice.csproj | 0 .../NadekoBot.Voice/PoopyBufferImmortalized.cs | 0 src/{ayu => }/NadekoBot.Voice/SocketClient.cs | 0 src/{ayu => }/NadekoBot.Voice/SongBuffer.cs | 0 src/{ayu => }/NadekoBot.Voice/VoiceClient.cs | 0 src/{ayu => }/NadekoBot.Voice/VoiceGateway.cs | 0 src/NadekoBot/GlobalUsings.cs | 1 - .../Modules/Searches/Crypto/CryptoService.cs | 2 +- .../ImagesharpStockChartDrawingService.cs | 6 ++---- .../Modules/Utility/Remind/RemindCommands.cs | 3 ++- src/NadekoBot/NadekoBot.csproj | 16 ++-------------- src/NadekoBot/Program.cs | 3 +++ src/NadekoBot/Services/Impl/PubSub/YamlSeria.cs | 2 +- .../Abstractions/Extensions/StringExtensions.cs | 2 +- .../Medusa/Common/Adapters/BehaviorAdapter.cs | 4 +--- .../Common/Adapters/ContextAdapterFactory.cs | 2 +- .../Medusa/Common/Adapters/DmContextAdapter.cs | 2 +- .../Medusa/Common/Adapters/FilterAdapter.cs | 2 +- .../Common/Adapters/GuildContextAdapter.cs | 2 +- .../Medusa/Common/Adapters/ParamParserAdapter.cs | 2 +- .../_common/Medusa/Common/CommandContextType.cs | 2 +- .../Medusa/Common/Config/IMedusaConfigService.cs | 2 +- .../_common/Medusa/Common/Config/MedusaConfig.cs | 2 +- .../Medusa/Common/Config/MedusaConfigService.cs | 2 +- .../Medusa/Common/MedusaAssemblyLoadContext.cs | 2 +- .../Medusa/Common/MedusaIoCKernelModule.cs | 5 ++--- .../_common/Medusa/Common/MedusaLoaderService.cs | 3 +-- .../_common/Medusa/Common/Models/ParamData.cs | 2 +- .../Medusa/Common/Models/ResolvedMedusa.cs | 4 ++-- .../Medusa/Common/Models/SnekCommandData.cs | 5 ++--- .../_common/Medusa/Common/Models/SnekData.cs | 4 +--- src/NadekoBot/_common/NadekoModule.cs | 2 +- 69 files changed, 59 insertions(+), 78 deletions(-) rename src/{ayu => }/NadekoBot.Voice/CloseCodes.cs (100%) rename src/{ayu => }/NadekoBot.Voice/LibOpus.cs (100%) rename src/{ayu => }/NadekoBot.Voice/LibSodium.cs (100%) rename src/{ayu => }/NadekoBot.Voice/Models/SelectProtocol.cs (100%) rename src/{ayu => }/NadekoBot.Voice/Models/VoiceHello.cs (100%) rename src/{ayu => }/NadekoBot.Voice/Models/VoiceIdentify.cs (100%) rename src/{ayu => }/NadekoBot.Voice/Models/VoicePayload.cs (100%) rename src/{ayu => }/NadekoBot.Voice/Models/VoiceReady.cs (100%) rename src/{ayu => }/NadekoBot.Voice/Models/VoiceResume.cs (100%) rename src/{ayu => }/NadekoBot.Voice/Models/VoiceSessionDescription.cs (100%) rename src/{ayu => }/NadekoBot.Voice/Models/VoiceSpeaking.cs (100%) rename src/{ayu => }/NadekoBot.Voice/NadekoBot.Voice.csproj (100%) rename src/{ayu => }/NadekoBot.Voice/PoopyBufferImmortalized.cs (100%) rename src/{ayu => }/NadekoBot.Voice/SocketClient.cs (100%) rename src/{ayu => }/NadekoBot.Voice/SongBuffer.cs (100%) rename src/{ayu => }/NadekoBot.Voice/VoiceClient.cs (100%) rename src/{ayu => }/NadekoBot.Voice/VoiceGateway.cs (100%) diff --git a/NadekoBot.sln b/NadekoBot.sln index a1f592b19..797877752 100644 --- a/NadekoBot.sln +++ b/NadekoBot.sln @@ -19,7 +19,7 @@ EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NadekoBot", "src\NadekoBot\NadekoBot.csproj", "{45EC1473-C678-4857-A544-07DFE0D0B478}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Voice", "src\ayu\NadekoBot.Voice\NadekoBot.Voice.csproj", "{2F4CF6D6-0C2F-4944-B204-9508CDA53195}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Voice", "src\NadekoBot.Voice\NadekoBot.Voice.csproj", "{2F4CF6D6-0C2F-4944-B204-9508CDA53195}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NadekoBot.Tests", "src\NadekoBot.Tests\NadekoBot.Tests.csproj", "{DB448DD4-C97F-40E9-8BD3-F605FF1FF833}" EndProject diff --git a/src/Nadeko.Medusa/Attributes/FilterAttribute.cs b/src/Nadeko.Medusa/Attributes/FilterAttribute.cs index 574bb32d6..da9e3e585 100644 --- a/src/Nadeko.Medusa/Attributes/FilterAttribute.cs +++ b/src/Nadeko.Medusa/Attributes/FilterAttribute.cs @@ -1,4 +1,4 @@ -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; /// /// Overridden to implement custom checks which commands have to pass in order to be executed. diff --git a/src/Nadeko.Medusa/Attributes/MedusaPermAttribute.cs b/src/Nadeko.Medusa/Attributes/MedusaPermAttribute.cs index becdfc37b..9ba395a23 100644 --- a/src/Nadeko.Medusa/Attributes/MedusaPermAttribute.cs +++ b/src/Nadeko.Medusa/Attributes/MedusaPermAttribute.cs @@ -1,4 +1,4 @@ -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; /// /// Used as a marker class for bot_perm and user_perm Attributes diff --git a/src/Nadeko.Medusa/Attributes/bot_owner_onlyAttribute.cs b/src/Nadeko.Medusa/Attributes/bot_owner_onlyAttribute.cs index a49727bd1..60bfe3824 100644 --- a/src/Nadeko.Medusa/Attributes/bot_owner_onlyAttribute.cs +++ b/src/Nadeko.Medusa/Attributes/bot_owner_onlyAttribute.cs @@ -1,4 +1,4 @@ -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; [AttributeUsage(AttributeTargets.Method)] public sealed class bot_owner_onlyAttribute : MedusaPermAttribute diff --git a/src/Nadeko.Medusa/Attributes/bot_permAttribute.cs b/src/Nadeko.Medusa/Attributes/bot_permAttribute.cs index c65fd223f..11058799d 100644 --- a/src/Nadeko.Medusa/Attributes/bot_permAttribute.cs +++ b/src/Nadeko.Medusa/Attributes/bot_permAttribute.cs @@ -1,6 +1,6 @@ using Discord; -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] public sealed class bot_permAttribute : MedusaPermAttribute diff --git a/src/Nadeko.Medusa/Attributes/cmdAttribute.cs b/src/Nadeko.Medusa/Attributes/cmdAttribute.cs index 109f185f3..598239e8f 100644 --- a/src/Nadeko.Medusa/Attributes/cmdAttribute.cs +++ b/src/Nadeko.Medusa/Attributes/cmdAttribute.cs @@ -1,4 +1,4 @@ -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; /// /// Marks a method as a snek command diff --git a/src/Nadeko.Medusa/Attributes/injectAttribute.cs b/src/Nadeko.Medusa/Attributes/injectAttribute.cs index 29cebddd6..5a24a5266 100644 --- a/src/Nadeko.Medusa/Attributes/injectAttribute.cs +++ b/src/Nadeko.Medusa/Attributes/injectAttribute.cs @@ -1,4 +1,4 @@ -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; /// /// Marks services in command arguments for injection. diff --git a/src/Nadeko.Medusa/Attributes/leftoverAttribute.cs b/src/Nadeko.Medusa/Attributes/leftoverAttribute.cs index d38968b12..c3adab817 100644 --- a/src/Nadeko.Medusa/Attributes/leftoverAttribute.cs +++ b/src/Nadeko.Medusa/Attributes/leftoverAttribute.cs @@ -1,4 +1,4 @@ -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; /// /// Marks the parameter to take diff --git a/src/Nadeko.Medusa/Attributes/prioAttribute.cs b/src/Nadeko.Medusa/Attributes/prioAttribute.cs index 40804a8b7..dbcc4ff5e 100644 --- a/src/Nadeko.Medusa/Attributes/prioAttribute.cs +++ b/src/Nadeko.Medusa/Attributes/prioAttribute.cs @@ -1,4 +1,4 @@ -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; /// /// Sets the priority of a command in case there are multiple commands with the same name but different parameters. diff --git a/src/Nadeko.Medusa/Attributes/svcAttribute.cs b/src/Nadeko.Medusa/Attributes/svcAttribute.cs index 03e8e7c5a..ec83d8522 100644 --- a/src/Nadeko.Medusa/Attributes/svcAttribute.cs +++ b/src/Nadeko.Medusa/Attributes/svcAttribute.cs @@ -1,4 +1,4 @@ -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; /// /// Marks the class as a service which can be used within the same Medusa diff --git a/src/Nadeko.Medusa/Attributes/user_permAttribute.cs b/src/Nadeko.Medusa/Attributes/user_permAttribute.cs index 34d82deb4..1e625614a 100644 --- a/src/Nadeko.Medusa/Attributes/user_permAttribute.cs +++ b/src/Nadeko.Medusa/Attributes/user_permAttribute.cs @@ -1,6 +1,6 @@ using Discord; -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] public sealed class user_permAttribute : MedusaPermAttribute diff --git a/src/Nadeko.Medusa/Context/AnyContext.cs b/src/Nadeko.Medusa/Context/AnyContext.cs index 9b3426730..52f25d7b6 100644 --- a/src/Nadeko.Medusa/Context/AnyContext.cs +++ b/src/Nadeko.Medusa/Context/AnyContext.cs @@ -1,7 +1,7 @@ using Discord; using NadekoBot; -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; /// /// Commands which take this class as a first parameter can be executed in both DMs and Servers diff --git a/src/Nadeko.Medusa/Context/DmContext.cs b/src/Nadeko.Medusa/Context/DmContext.cs index 35f9dd723..b5d1d476a 100644 --- a/src/Nadeko.Medusa/Context/DmContext.cs +++ b/src/Nadeko.Medusa/Context/DmContext.cs @@ -1,6 +1,6 @@ using Discord; -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; /// /// Commands which take this type as the first parameter can only be executed in DMs diff --git a/src/Nadeko.Medusa/Context/GuildContext.cs b/src/Nadeko.Medusa/Context/GuildContext.cs index 3fcd68812..ce22f7ed0 100644 --- a/src/Nadeko.Medusa/Context/GuildContext.cs +++ b/src/Nadeko.Medusa/Context/GuildContext.cs @@ -1,6 +1,6 @@ using Discord; -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; /// /// Commands which take this type as a first parameter can only be executed in a server diff --git a/src/Nadeko.Medusa/Extensions/EmbedBuilderExtensions.cs b/src/Nadeko.Medusa/Extensions/EmbedBuilderExtensions.cs index f6ff9f235..0e8f70417 100644 --- a/src/Nadeko.Medusa/Extensions/EmbedBuilderExtensions.cs +++ b/src/Nadeko.Medusa/Extensions/EmbedBuilderExtensions.cs @@ -1,4 +1,4 @@ -namespace NadekoBot; +namespace NadekoBot.Medusa; public static class EmbedBuilderExtensions { diff --git a/src/Nadeko.Medusa/Extensions/MedusaExtensions.cs b/src/Nadeko.Medusa/Extensions/MedusaExtensions.cs index f5d79fa9c..48ed2ceb4 100644 --- a/src/Nadeko.Medusa/Extensions/MedusaExtensions.cs +++ b/src/Nadeko.Medusa/Extensions/MedusaExtensions.cs @@ -1,7 +1,6 @@ using Discord; -using Nadeko.Snake; -namespace NadekoBot; +namespace NadekoBot.Medusa; public static class MedusaExtensions { diff --git a/src/Nadeko.Medusa/Nadeko.Medusa.csproj b/src/Nadeko.Medusa/Nadeko.Medusa.csproj index a0e3f1c06..81b9684cb 100644 --- a/src/Nadeko.Medusa/Nadeko.Medusa.csproj +++ b/src/Nadeko.Medusa/Nadeko.Medusa.csproj @@ -15,6 +15,6 @@ - 6.0.0 + 9.0.0 diff --git a/src/Nadeko.Medusa/ParamParser/ParamParser.cs b/src/Nadeko.Medusa/ParamParser/ParamParser.cs index 8c8abbe1c..fe8a76b16 100644 --- a/src/Nadeko.Medusa/ParamParser/ParamParser.cs +++ b/src/Nadeko.Medusa/ParamParser/ParamParser.cs @@ -1,4 +1,4 @@ -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; /// /// Overridden to implement parsers for custom types diff --git a/src/Nadeko.Medusa/ParamParser/ParseResult.cs b/src/Nadeko.Medusa/ParamParser/ParseResult.cs index 4b4ad60c7..5ebcbaf47 100644 --- a/src/Nadeko.Medusa/ParamParser/ParseResult.cs +++ b/src/Nadeko.Medusa/ParamParser/ParseResult.cs @@ -1,4 +1,4 @@ -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; public readonly struct ParseResult { diff --git a/src/Nadeko.Medusa/Snek.cs b/src/Nadeko.Medusa/Snek.cs index 6fa963268..6d1d95085 100644 --- a/src/Nadeko.Medusa/Snek.cs +++ b/src/Nadeko.Medusa/Snek.cs @@ -1,6 +1,6 @@ using Discord; -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; /// /// The base class which will be loaded as a module into NadekoBot diff --git a/src/Nadeko.Medusa/Strings/CommandStrings.cs b/src/Nadeko.Medusa/Strings/CommandStrings.cs index a10c280c9..844d5b1b0 100644 --- a/src/Nadeko.Medusa/Strings/CommandStrings.cs +++ b/src/Nadeko.Medusa/Strings/CommandStrings.cs @@ -1,6 +1,6 @@ using YamlDotNet.Serialization; -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; public readonly struct CommandStrings { diff --git a/src/Nadeko.Medusa/Strings/IMedusaStrings.cs b/src/Nadeko.Medusa/Strings/IMedusaStrings.cs index 87de00179..e4042c0e6 100644 --- a/src/Nadeko.Medusa/Strings/IMedusaStrings.cs +++ b/src/Nadeko.Medusa/Strings/IMedusaStrings.cs @@ -1,6 +1,6 @@ using System.Globalization; -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; /// /// Defines methods to retrieve and reload medusa strings diff --git a/src/Nadeko.Medusa/Strings/IMedusaStringsProvider.cs b/src/Nadeko.Medusa/Strings/IMedusaStringsProvider.cs index a369049fc..aa11f926a 100644 --- a/src/Nadeko.Medusa/Strings/IMedusaStringsProvider.cs +++ b/src/Nadeko.Medusa/Strings/IMedusaStringsProvider.cs @@ -1,4 +1,4 @@ -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; /// /// Implemented by classes which provide localized strings in their own ways diff --git a/src/Nadeko.Medusa/Strings/LocalMedusaStringsProvider.cs b/src/Nadeko.Medusa/Strings/LocalMedusaStringsProvider.cs index 422dd7e63..303a94ec3 100644 --- a/src/Nadeko.Medusa/Strings/LocalMedusaStringsProvider.cs +++ b/src/Nadeko.Medusa/Strings/LocalMedusaStringsProvider.cs @@ -1,4 +1,4 @@ -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; public class LocalMedusaStringsProvider : IMedusaStringsProvider { diff --git a/src/Nadeko.Medusa/Strings/MedusaStrings.cs b/src/Nadeko.Medusa/Strings/MedusaStrings.cs index 6f6137163..09b6db4df 100644 --- a/src/Nadeko.Medusa/Strings/MedusaStrings.cs +++ b/src/Nadeko.Medusa/Strings/MedusaStrings.cs @@ -1,7 +1,7 @@ using System.Globalization; using Serilog; -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; public class MedusaStrings : IMedusaStrings { diff --git a/src/Nadeko.Medusa/Strings/StringsLoader.cs b/src/Nadeko.Medusa/Strings/StringsLoader.cs index 0a58020ef..5bfb77a6b 100644 --- a/src/Nadeko.Medusa/Strings/StringsLoader.cs +++ b/src/Nadeko.Medusa/Strings/StringsLoader.cs @@ -2,7 +2,7 @@ using Serilog; using YamlDotNet.Serialization; -namespace Nadeko.Snake; +namespace NadekoBot.Medusa; /// /// Loads strings from the shortcut or localizable path diff --git a/src/ayu/NadekoBot.Voice/CloseCodes.cs b/src/NadekoBot.Voice/CloseCodes.cs similarity index 100% rename from src/ayu/NadekoBot.Voice/CloseCodes.cs rename to src/NadekoBot.Voice/CloseCodes.cs diff --git a/src/ayu/NadekoBot.Voice/LibOpus.cs b/src/NadekoBot.Voice/LibOpus.cs similarity index 100% rename from src/ayu/NadekoBot.Voice/LibOpus.cs rename to src/NadekoBot.Voice/LibOpus.cs diff --git a/src/ayu/NadekoBot.Voice/LibSodium.cs b/src/NadekoBot.Voice/LibSodium.cs similarity index 100% rename from src/ayu/NadekoBot.Voice/LibSodium.cs rename to src/NadekoBot.Voice/LibSodium.cs diff --git a/src/ayu/NadekoBot.Voice/Models/SelectProtocol.cs b/src/NadekoBot.Voice/Models/SelectProtocol.cs similarity index 100% rename from src/ayu/NadekoBot.Voice/Models/SelectProtocol.cs rename to src/NadekoBot.Voice/Models/SelectProtocol.cs diff --git a/src/ayu/NadekoBot.Voice/Models/VoiceHello.cs b/src/NadekoBot.Voice/Models/VoiceHello.cs similarity index 100% rename from src/ayu/NadekoBot.Voice/Models/VoiceHello.cs rename to src/NadekoBot.Voice/Models/VoiceHello.cs diff --git a/src/ayu/NadekoBot.Voice/Models/VoiceIdentify.cs b/src/NadekoBot.Voice/Models/VoiceIdentify.cs similarity index 100% rename from src/ayu/NadekoBot.Voice/Models/VoiceIdentify.cs rename to src/NadekoBot.Voice/Models/VoiceIdentify.cs diff --git a/src/ayu/NadekoBot.Voice/Models/VoicePayload.cs b/src/NadekoBot.Voice/Models/VoicePayload.cs similarity index 100% rename from src/ayu/NadekoBot.Voice/Models/VoicePayload.cs rename to src/NadekoBot.Voice/Models/VoicePayload.cs diff --git a/src/ayu/NadekoBot.Voice/Models/VoiceReady.cs b/src/NadekoBot.Voice/Models/VoiceReady.cs similarity index 100% rename from src/ayu/NadekoBot.Voice/Models/VoiceReady.cs rename to src/NadekoBot.Voice/Models/VoiceReady.cs diff --git a/src/ayu/NadekoBot.Voice/Models/VoiceResume.cs b/src/NadekoBot.Voice/Models/VoiceResume.cs similarity index 100% rename from src/ayu/NadekoBot.Voice/Models/VoiceResume.cs rename to src/NadekoBot.Voice/Models/VoiceResume.cs diff --git a/src/ayu/NadekoBot.Voice/Models/VoiceSessionDescription.cs b/src/NadekoBot.Voice/Models/VoiceSessionDescription.cs similarity index 100% rename from src/ayu/NadekoBot.Voice/Models/VoiceSessionDescription.cs rename to src/NadekoBot.Voice/Models/VoiceSessionDescription.cs diff --git a/src/ayu/NadekoBot.Voice/Models/VoiceSpeaking.cs b/src/NadekoBot.Voice/Models/VoiceSpeaking.cs similarity index 100% rename from src/ayu/NadekoBot.Voice/Models/VoiceSpeaking.cs rename to src/NadekoBot.Voice/Models/VoiceSpeaking.cs diff --git a/src/ayu/NadekoBot.Voice/NadekoBot.Voice.csproj b/src/NadekoBot.Voice/NadekoBot.Voice.csproj similarity index 100% rename from src/ayu/NadekoBot.Voice/NadekoBot.Voice.csproj rename to src/NadekoBot.Voice/NadekoBot.Voice.csproj diff --git a/src/ayu/NadekoBot.Voice/PoopyBufferImmortalized.cs b/src/NadekoBot.Voice/PoopyBufferImmortalized.cs similarity index 100% rename from src/ayu/NadekoBot.Voice/PoopyBufferImmortalized.cs rename to src/NadekoBot.Voice/PoopyBufferImmortalized.cs diff --git a/src/ayu/NadekoBot.Voice/SocketClient.cs b/src/NadekoBot.Voice/SocketClient.cs similarity index 100% rename from src/ayu/NadekoBot.Voice/SocketClient.cs rename to src/NadekoBot.Voice/SocketClient.cs diff --git a/src/ayu/NadekoBot.Voice/SongBuffer.cs b/src/NadekoBot.Voice/SongBuffer.cs similarity index 100% rename from src/ayu/NadekoBot.Voice/SongBuffer.cs rename to src/NadekoBot.Voice/SongBuffer.cs diff --git a/src/ayu/NadekoBot.Voice/VoiceClient.cs b/src/NadekoBot.Voice/VoiceClient.cs similarity index 100% rename from src/ayu/NadekoBot.Voice/VoiceClient.cs rename to src/NadekoBot.Voice/VoiceClient.cs diff --git a/src/ayu/NadekoBot.Voice/VoiceGateway.cs b/src/NadekoBot.Voice/VoiceGateway.cs similarity index 100% rename from src/ayu/NadekoBot.Voice/VoiceGateway.cs rename to src/NadekoBot.Voice/VoiceGateway.cs diff --git a/src/NadekoBot/GlobalUsings.cs b/src/NadekoBot/GlobalUsings.cs index d1f3b7ac8..fe71f464d 100644 --- a/src/NadekoBot/GlobalUsings.cs +++ b/src/NadekoBot/GlobalUsings.cs @@ -12,7 +12,6 @@ global using Nadeko.Common; // new project global using NadekoBot.Common; // old + nadekobot specific things global using NadekoBot.Common.Attributes; global using NadekoBot.Extensions; -// global using Nadeko.Snake; // discord global using Discord; diff --git a/src/NadekoBot/Modules/Searches/Crypto/CryptoService.cs b/src/NadekoBot/Modules/Searches/Crypto/CryptoService.cs index b791c1fee..dd64e42a6 100644 --- a/src/NadekoBot/Modules/Searches/Crypto/CryptoService.cs +++ b/src/NadekoBot/Modules/Searches/Crypto/CryptoService.cs @@ -118,7 +118,7 @@ public class CryptoService : INService var nearest = cryptos .Select(elem => (Elem: elem, - Distance: StringExtensions.LevenshteinDistance(elem.Name.ToUpperInvariant(), name))) + Distance: elem.Name.ToUpperInvariant().LevenshteinDistance(name))) .OrderBy(x => x.Distance) .FirstOrDefault(x => x.Distance <= 2); diff --git a/src/NadekoBot/Modules/Searches/Crypto/Drawing/ImagesharpStockChartDrawingService.cs b/src/NadekoBot/Modules/Searches/Crypto/Drawing/ImagesharpStockChartDrawingService.cs index ac464eae8..7e7b3c760 100644 --- a/src/NadekoBot/Modules/Searches/Crypto/Drawing/ImagesharpStockChartDrawingService.cs +++ b/src/NadekoBot/Modules/Searches/Crypto/Drawing/ImagesharpStockChartDrawingService.cs @@ -94,8 +94,7 @@ public sealed class ImagesharpStockChartDrawingService : IStockChartDrawingServi => image.Mutate(ctx => { foreach (var data in drawData) - DrawLineExtensions.DrawLines(ctx, - data.IsGreen + ctx.DrawLines(data.IsGreen ? _greenBrush : _redBrush, 1, @@ -104,8 +103,7 @@ public sealed class ImagesharpStockChartDrawingService : IStockChartDrawingServi foreach (var data in drawData) - FillRectangleExtensions.Fill(ctx, - data.IsGreen + ctx.Fill(data.IsGreen ? _greenBrush : _redBrush, data.BodyRect); diff --git a/src/NadekoBot/Modules/Utility/Remind/RemindCommands.cs b/src/NadekoBot/Modules/Utility/Remind/RemindCommands.cs index 06bd40cba..0365dd577 100644 --- a/src/NadekoBot/Modules/Utility/Remind/RemindCommands.cs +++ b/src/NadekoBot/Modules/Utility/Remind/RemindCommands.cs @@ -3,6 +3,7 @@ using Humanizer.Localisation; using NadekoBot.Db; using NadekoBot.Modules.Utility.Services; using NadekoBot.Db.Models; +using System.Resources; namespace NadekoBot.Modules.Utility; @@ -43,7 +44,7 @@ public partial class Utility await ReplyErrorLocalizedAsync(strs.remind_invalid); return; } - + ulong target; target = meorhere == MeOrHere.Me ? ctx.User.Id : ctx.Channel.Id; if (!await RemindInternal(target, diff --git a/src/NadekoBot/NadekoBot.csproj b/src/NadekoBot/NadekoBot.csproj index 8f018c86e..4df09c0ea 100644 --- a/src/NadekoBot/NadekoBot.csproj +++ b/src/NadekoBot/NadekoBot.csproj @@ -5,7 +5,6 @@ enable true 5.0.0 - beta1 $(MSBuildProjectDirectory) @@ -76,7 +75,7 @@ - + all @@ -110,9 +109,8 @@ - - + @@ -133,16 +131,6 @@ Always - - - - - - - - - - diff --git a/src/NadekoBot/Program.cs b/src/NadekoBot/Program.cs index 53b8fcde5..9587d6028 100644 --- a/src/NadekoBot/Program.cs +++ b/src/NadekoBot/Program.cs @@ -1,3 +1,6 @@ +using Humanizer.Localisation; +using System.Resources; + var pid = Environment.ProcessId; var shardId = 0; diff --git a/src/NadekoBot/Services/Impl/PubSub/YamlSeria.cs b/src/NadekoBot/Services/Impl/PubSub/YamlSeria.cs index 42c60842d..235ee03b6 100644 --- a/src/NadekoBot/Services/Impl/PubSub/YamlSeria.cs +++ b/src/NadekoBot/Services/Impl/PubSub/YamlSeria.cs @@ -28,7 +28,7 @@ public class YamlSeria : IConfigSeria me => { var str = me.Groups["code"].Value; - var newString = YamlHelper.UnescapeUnicodeCodePoint(str); + var newString = str.UnescapeUnicodeCodePoint(); return newString; }); return output; diff --git a/src/NadekoBot/_common/Abstractions/Extensions/StringExtensions.cs b/src/NadekoBot/_common/Abstractions/Extensions/StringExtensions.cs index afa0d3a7c..e0289c83b 100644 --- a/src/NadekoBot/_common/Abstractions/Extensions/StringExtensions.cs +++ b/src/NadekoBot/_common/Abstractions/Extensions/StringExtensions.cs @@ -131,7 +131,7 @@ public static class StringExtensions me => { var str = me.Groups["code"].Value; - var newString = YamlHelper.UnescapeUnicodeCodePoint(str); + var newString = str.UnescapeUnicodeCodePoint(); return newString; }); } \ No newline at end of file diff --git a/src/NadekoBot/_common/Medusa/Common/Adapters/BehaviorAdapter.cs b/src/NadekoBot/_common/Medusa/Common/Adapters/BehaviorAdapter.cs index 03f74759b..cedd30a0e 100644 --- a/src/NadekoBot/_common/Medusa/Common/Adapters/BehaviorAdapter.cs +++ b/src/NadekoBot/_common/Medusa/Common/Adapters/BehaviorAdapter.cs @@ -1,6 +1,4 @@ -#nullable enable - -using Nadeko.Snake; +using NadekoBot.Medusa; [DIIgnore] public sealed class BehaviorAdapter : ICustomBehavior diff --git a/src/NadekoBot/_common/Medusa/Common/Adapters/ContextAdapterFactory.cs b/src/NadekoBot/_common/Medusa/Common/Adapters/ContextAdapterFactory.cs index 5251a2f29..98853bcbc 100644 --- a/src/NadekoBot/_common/Medusa/Common/Adapters/ContextAdapterFactory.cs +++ b/src/NadekoBot/_common/Medusa/Common/Adapters/ContextAdapterFactory.cs @@ -1,4 +1,4 @@ -using Nadeko.Snake; +using NadekoBot.Medusa; internal class ContextAdapterFactory { diff --git a/src/NadekoBot/_common/Medusa/Common/Adapters/DmContextAdapter.cs b/src/NadekoBot/_common/Medusa/Common/Adapters/DmContextAdapter.cs index 64a968cbd..9e520454b 100644 --- a/src/NadekoBot/_common/Medusa/Common/Adapters/DmContextAdapter.cs +++ b/src/NadekoBot/_common/Medusa/Common/Adapters/DmContextAdapter.cs @@ -1,5 +1,5 @@ using Microsoft.Extensions.DependencyInjection; -using Nadeko.Snake; +using NadekoBot.Medusa; public sealed class DmContextAdapter : DmContext { diff --git a/src/NadekoBot/_common/Medusa/Common/Adapters/FilterAdapter.cs b/src/NadekoBot/_common/Medusa/Common/Adapters/FilterAdapter.cs index 47ae76c58..b0f41cbbc 100644 --- a/src/NadekoBot/_common/Medusa/Common/Adapters/FilterAdapter.cs +++ b/src/NadekoBot/_common/Medusa/Common/Adapters/FilterAdapter.cs @@ -1,4 +1,4 @@ -using Nadeko.Snake; +using NadekoBot.Medusa; namespace Nadeko.Medusa.Adapters; diff --git a/src/NadekoBot/_common/Medusa/Common/Adapters/GuildContextAdapter.cs b/src/NadekoBot/_common/Medusa/Common/Adapters/GuildContextAdapter.cs index 7d33fd8f6..7a6b2972e 100644 --- a/src/NadekoBot/_common/Medusa/Common/Adapters/GuildContextAdapter.cs +++ b/src/NadekoBot/_common/Medusa/Common/Adapters/GuildContextAdapter.cs @@ -1,5 +1,5 @@ using Microsoft.Extensions.DependencyInjection; -using Nadeko.Snake; +using NadekoBot.Medusa; public sealed class GuildContextAdapter : GuildContext { diff --git a/src/NadekoBot/_common/Medusa/Common/Adapters/ParamParserAdapter.cs b/src/NadekoBot/_common/Medusa/Common/Adapters/ParamParserAdapter.cs index f23946b79..3cf8c179f 100644 --- a/src/NadekoBot/_common/Medusa/Common/Adapters/ParamParserAdapter.cs +++ b/src/NadekoBot/_common/Medusa/Common/Adapters/ParamParserAdapter.cs @@ -1,4 +1,4 @@ -using Nadeko.Snake; +using NadekoBot.Medusa; public sealed class ParamParserAdapter : TypeReader { diff --git a/src/NadekoBot/_common/Medusa/Common/CommandContextType.cs b/src/NadekoBot/_common/Medusa/Common/CommandContextType.cs index 0b6bde876..3b5e8e9b4 100644 --- a/src/NadekoBot/_common/Medusa/Common/CommandContextType.cs +++ b/src/NadekoBot/_common/Medusa/Common/CommandContextType.cs @@ -1,4 +1,4 @@ -namespace Nadeko.Medusa; +namespace NadekoBot.Medusa; /// /// Enum specifying in which context the command can be executed diff --git a/src/NadekoBot/_common/Medusa/Common/Config/IMedusaConfigService.cs b/src/NadekoBot/_common/Medusa/Common/Config/IMedusaConfigService.cs index 01e9fe4c1..fb8138185 100644 --- a/src/NadekoBot/_common/Medusa/Common/Config/IMedusaConfigService.cs +++ b/src/NadekoBot/_common/Medusa/Common/Config/IMedusaConfigService.cs @@ -1,4 +1,4 @@ -namespace Nadeko.Medusa; +namespace NadekoBot.Medusa; public interface IMedusaConfigService { diff --git a/src/NadekoBot/_common/Medusa/Common/Config/MedusaConfig.cs b/src/NadekoBot/_common/Medusa/Common/Config/MedusaConfig.cs index 2ac4e1aa8..a6136dded 100644 --- a/src/NadekoBot/_common/Medusa/Common/Config/MedusaConfig.cs +++ b/src/NadekoBot/_common/Medusa/Common/Config/MedusaConfig.cs @@ -2,7 +2,7 @@ using Cloneable; using NadekoBot.Common.Yml; -namespace Nadeko.Medusa; +namespace NadekoBot.Medusa; [Cloneable] public sealed partial class MedusaConfig : ICloneable diff --git a/src/NadekoBot/_common/Medusa/Common/Config/MedusaConfigService.cs b/src/NadekoBot/_common/Medusa/Common/Config/MedusaConfigService.cs index 50cb305ea..324594573 100644 --- a/src/NadekoBot/_common/Medusa/Common/Config/MedusaConfigService.cs +++ b/src/NadekoBot/_common/Medusa/Common/Config/MedusaConfigService.cs @@ -1,6 +1,6 @@ using NadekoBot.Common.Configs; -namespace Nadeko.Medusa; +namespace NadekoBot.Medusa; public sealed class MedusaConfigService : ConfigServiceBase, IMedusaConfigService { diff --git a/src/NadekoBot/_common/Medusa/Common/MedusaAssemblyLoadContext.cs b/src/NadekoBot/_common/Medusa/Common/MedusaAssemblyLoadContext.cs index 2d39fa797..3ea828a66 100644 --- a/src/NadekoBot/_common/Medusa/Common/MedusaAssemblyLoadContext.cs +++ b/src/NadekoBot/_common/Medusa/Common/MedusaAssemblyLoadContext.cs @@ -1,7 +1,7 @@ using System.Reflection; using System.Runtime.Loader; -namespace Nadeko.Medusa; +namespace NadekoBot.Medusa; public class MedusaAssemblyLoadContext : AssemblyLoadContext { diff --git a/src/NadekoBot/_common/Medusa/Common/MedusaIoCKernelModule.cs b/src/NadekoBot/_common/Medusa/Common/MedusaIoCKernelModule.cs index 474468bcc..40dbab400 100644 --- a/src/NadekoBot/_common/Medusa/Common/MedusaIoCKernelModule.cs +++ b/src/NadekoBot/_common/Medusa/Common/MedusaIoCKernelModule.cs @@ -1,5 +1,4 @@ -using Nadeko.Snake; -using System.Reflection; +using System.Reflection; using Ninject; using Ninject.Activation; using Ninject.Activation.Caching; @@ -7,7 +6,7 @@ using Ninject.Modules; using Ninject.Planning; using System.Text.Json; -namespace Nadeko.Medusa; +namespace NadekoBot.Medusa; public sealed class MedusaNinjectModule : NinjectModule { diff --git a/src/NadekoBot/_common/Medusa/Common/MedusaLoaderService.cs b/src/NadekoBot/_common/Medusa/Common/MedusaLoaderService.cs index 75f9697d5..45c26e122 100644 --- a/src/NadekoBot/_common/Medusa/Common/MedusaLoaderService.cs +++ b/src/NadekoBot/_common/Medusa/Common/MedusaLoaderService.cs @@ -10,9 +10,8 @@ using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Reflection; using System.Runtime.CompilerServices; -using Nadeko.Snake; -namespace Nadeko.Medusa; +namespace NadekoBot.Medusa; // ReSharper disable RedundantAssignment public sealed class MedusaLoaderService : IMedusaLoaderService, IReadyExecutor, INService diff --git a/src/NadekoBot/_common/Medusa/Common/Models/ParamData.cs b/src/NadekoBot/_common/Medusa/Common/Models/ParamData.cs index dc38791a1..f6cca2786 100644 --- a/src/NadekoBot/_common/Medusa/Common/Models/ParamData.cs +++ b/src/NadekoBot/_common/Medusa/Common/Models/ParamData.cs @@ -1,4 +1,4 @@ -namespace Nadeko.Medusa; +namespace NadekoBot.Medusa; public sealed record ParamData( Type Type, diff --git a/src/NadekoBot/_common/Medusa/Common/Models/ResolvedMedusa.cs b/src/NadekoBot/_common/Medusa/Common/Models/ResolvedMedusa.cs index 89ecca085..4d5c311bf 100644 --- a/src/NadekoBot/_common/Medusa/Common/Models/ResolvedMedusa.cs +++ b/src/NadekoBot/_common/Medusa/Common/Models/ResolvedMedusa.cs @@ -1,8 +1,8 @@ -using Nadeko.Snake; +using NadekoBot.Medusa; using Ninject.Modules; using System.Collections.Immutable; -namespace Nadeko.Medusa; +namespace NadekoBot.Medusa; public sealed record ResolvedMedusa( WeakReference LoadContext, diff --git a/src/NadekoBot/_common/Medusa/Common/Models/SnekCommandData.cs b/src/NadekoBot/_common/Medusa/Common/Models/SnekCommandData.cs index c6ec8135d..8a877c2f7 100644 --- a/src/NadekoBot/_common/Medusa/Common/Models/SnekCommandData.cs +++ b/src/NadekoBot/_common/Medusa/Common/Models/SnekCommandData.cs @@ -1,8 +1,7 @@ -using Nadeko.Snake; +using NadekoBot.Medusa; using System.Reflection; -using CommandStrings = Nadeko.Snake.CommandStrings; -namespace Nadeko.Medusa; +namespace NadekoBot.Medusa; public sealed class SnekCommandData { diff --git a/src/NadekoBot/_common/Medusa/Common/Models/SnekData.cs b/src/NadekoBot/_common/Medusa/Common/Models/SnekData.cs index 54a597202..ca96f7b63 100644 --- a/src/NadekoBot/_common/Medusa/Common/Models/SnekData.cs +++ b/src/NadekoBot/_common/Medusa/Common/Models/SnekData.cs @@ -1,6 +1,4 @@ -using Nadeko.Snake; - -namespace Nadeko.Medusa; +namespace NadekoBot.Medusa; public sealed record SnekInfo( string Name, diff --git a/src/NadekoBot/_common/NadekoModule.cs b/src/NadekoBot/_common/NadekoModule.cs index dac62e18c..1b6bcb30a 100644 --- a/src/NadekoBot/_common/NadekoModule.cs +++ b/src/NadekoBot/_common/NadekoModule.cs @@ -86,7 +86,7 @@ public abstract class NadekoModule : ModuleBase embed.WithPendingColor() .WithFooter("yes/no"); - var msg = await MessageChannelExtensions.EmbedAsync(ctx.Channel, embed); + var msg = await ctx.Channel.EmbedAsync(embed); try { var input = await GetUserInputAsync(ctx.User.Id, ctx.Channel.Id);