diff --git a/Geekbot.net.sln b/Geekbot.net.sln index f2176cb..78033a3 100644 --- a/Geekbot.net.sln +++ b/Geekbot.net.sln @@ -13,6 +13,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bot", "src\Bot\Bot.csproj", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands", "src\Commands\Commands.csproj", "{7C771DFE-912A-4276-B0A6-047E09603F1E}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Interactions", "src\Interactions\Interactions.csproj", "{FF6859D9-C539-4910-BE1E-9ECFED2F46FA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -39,6 +41,10 @@ Global {7C771DFE-912A-4276-B0A6-047E09603F1E}.Debug|Any CPU.Build.0 = Debug|Any CPU {7C771DFE-912A-4276-B0A6-047E09603F1E}.Release|Any CPU.ActiveCfg = Release|Any CPU {7C771DFE-912A-4276-B0A6-047E09603F1E}.Release|Any CPU.Build.0 = Release|Any CPU + {FF6859D9-C539-4910-BE1E-9ECFED2F46FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF6859D9-C539-4910-BE1E-9ECFED2F46FA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF6859D9-C539-4910-BE1E-9ECFED2F46FA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF6859D9-C539-4910-BE1E-9ECFED2F46FA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/Bot/Commands/User/Karma.cs b/src/Bot/Commands/User/Karma.cs index 23dd11d..267c558 100644 --- a/src/Bot/Commands/User/Karma.cs +++ b/src/Bot/Commands/User/Karma.cs @@ -47,14 +47,14 @@ namespace Geekbot.Bot.Commands.User { try { - var author = new Core.Interactions.Resolved.User() + var author = new Interactions.Resolved.User() { Id = Context.User.Id.ToString(), Username = Context.User.Username, Discriminator = Context.User.Discriminator, Avatar = Context.User.AvatarId, }; - var targetUser = new Core.Interactions.Resolved.User() + var targetUser = new Interactions.Resolved.User() { Id = user.Id.ToString(), Username = user.Username, diff --git a/src/Bot/Commands/User/Ranking/Rank.cs b/src/Bot/Commands/User/Rank.cs similarity index 95% rename from src/Bot/Commands/User/Ranking/Rank.cs rename to src/Bot/Commands/User/Rank.cs index e9aac67..3463b49 100644 --- a/src/Bot/Commands/User/Ranking/Rank.cs +++ b/src/Bot/Commands/User/Rank.cs @@ -9,7 +9,7 @@ using Geekbot.Core.ErrorHandling; using Geekbot.Core.GuildSettingsManager; using Geekbot.Core.Highscores; -namespace Geekbot.Bot.Commands.User.Ranking +namespace Geekbot.Bot.Commands.User { public class Rank : GeekbotCommandBase { diff --git a/src/Commands/Commands.csproj b/src/Commands/Commands.csproj index a077b23..9dbaf5b 100644 --- a/src/Commands/Commands.csproj +++ b/src/Commands/Commands.csproj @@ -15,6 +15,7 @@ + diff --git a/src/Commands/Karma/Karma.cs b/src/Commands/Karma/Karma.cs index 7d19715..8671f7a 100644 --- a/src/Commands/Karma/Karma.cs +++ b/src/Commands/Karma/Karma.cs @@ -2,8 +2,8 @@ using System.Drawing; using Geekbot.Core; using Geekbot.Core.Database; using Geekbot.Core.Database.Models; -using Geekbot.Core.Interactions.Embed; -using Geekbot.Core.Interactions.Resolved; +using Geekbot.Interactions.Embed; +using Geekbot.Interactions.Resolved; using Localization = Geekbot.Core.Localization; namespace Geekbot.Commands.Karma; diff --git a/src/Commands/UrbanDictionary/UrbanDictionary.cs b/src/Commands/UrbanDictionary/UrbanDictionary.cs index 7b99c2b..9862463 100644 --- a/src/Commands/UrbanDictionary/UrbanDictionary.cs +++ b/src/Commands/UrbanDictionary/UrbanDictionary.cs @@ -1,6 +1,6 @@ using System.Drawing; using Geekbot.Core; -using Geekbot.Core.Interactions.Embed; +using Geekbot.Interactions.Embed; namespace Geekbot.Commands.UrbanDictionary; diff --git a/src/Core/Interactions/IInteractionCommandManager.cs b/src/Core/Interactions/IInteractionCommandManager.cs deleted file mode 100644 index aa1069a..0000000 --- a/src/Core/Interactions/IInteractionCommandManager.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections.Generic; -using System.Threading.Tasks; -using Geekbot.Core.Interactions.ApplicationCommand; -using Geekbot.Core.Interactions.Request; -using Geekbot.Core.Interactions.Response; - -namespace Geekbot.Core.Interactions -{ - public interface IInteractionCommandManager - { - Dictionary CommandsInfo { get; init; } - Task RunCommand(Interaction interaction); - } -} \ No newline at end of file diff --git a/src/Core/Interactions/ApplicationCommand/Command.cs b/src/Interactions/ApplicationCommand/Command.cs similarity index 94% rename from src/Core/Interactions/ApplicationCommand/Command.cs rename to src/Interactions/ApplicationCommand/Command.cs index aaf1e74..9f11c11 100644 --- a/src/Core/Interactions/ApplicationCommand/Command.cs +++ b/src/Interactions/ApplicationCommand/Command.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.ApplicationCommand +namespace Geekbot.Interactions.ApplicationCommand { /// public record Command diff --git a/src/Core/Interactions/ApplicationCommand/CommandType.cs b/src/Interactions/ApplicationCommand/CommandType.cs similarity index 89% rename from src/Core/Interactions/ApplicationCommand/CommandType.cs rename to src/Interactions/ApplicationCommand/CommandType.cs index f4e565b..5d14ca1 100644 --- a/src/Core/Interactions/ApplicationCommand/CommandType.cs +++ b/src/Interactions/ApplicationCommand/CommandType.cs @@ -1,4 +1,4 @@ -namespace Geekbot.Core.Interactions.ApplicationCommand +namespace Geekbot.Interactions.ApplicationCommand { /// public enum CommandType diff --git a/src/Core/Interactions/ApplicationCommand/Option.cs b/src/Interactions/ApplicationCommand/Option.cs similarity index 92% rename from src/Core/Interactions/ApplicationCommand/Option.cs rename to src/Interactions/ApplicationCommand/Option.cs index 9113600..515f9f4 100644 --- a/src/Core/Interactions/ApplicationCommand/Option.cs +++ b/src/Interactions/ApplicationCommand/Option.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.ApplicationCommand +namespace Geekbot.Interactions.ApplicationCommand { /// /// Required options must be listed before optional options diff --git a/src/Core/Interactions/ApplicationCommand/OptionChoice.cs b/src/Interactions/ApplicationCommand/OptionChoice.cs similarity index 90% rename from src/Core/Interactions/ApplicationCommand/OptionChoice.cs rename to src/Interactions/ApplicationCommand/OptionChoice.cs index d10e6ec..cc12acf 100644 --- a/src/Core/Interactions/ApplicationCommand/OptionChoice.cs +++ b/src/Interactions/ApplicationCommand/OptionChoice.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.ApplicationCommand +namespace Geekbot.Interactions.ApplicationCommand { /// /// If you specify choices for an option, they are the only valid values for a user to pick diff --git a/src/Core/Interactions/ApplicationCommand/OptionType.cs b/src/Interactions/ApplicationCommand/OptionType.cs similarity index 90% rename from src/Core/Interactions/ApplicationCommand/OptionType.cs rename to src/Interactions/ApplicationCommand/OptionType.cs index 4342b33..34299f1 100644 --- a/src/Core/Interactions/ApplicationCommand/OptionType.cs +++ b/src/Interactions/ApplicationCommand/OptionType.cs @@ -1,4 +1,4 @@ -namespace Geekbot.Core.Interactions.ApplicationCommand +namespace Geekbot.Interactions.ApplicationCommand { /// public enum OptionType diff --git a/src/Core/Interactions/Embed/Embed.cs b/src/Interactions/Embed/Embed.cs similarity index 94% rename from src/Core/Interactions/Embed/Embed.cs rename to src/Interactions/Embed/Embed.cs index ca60491..d392e7b 100644 --- a/src/Core/Interactions/Embed/Embed.cs +++ b/src/Interactions/Embed/Embed.cs @@ -1,10 +1,8 @@ -using System; -using System.Collections.Generic; using System.Text.Json.Serialization; using Discord; using Color = System.Drawing.Color; -namespace Geekbot.Core.Interactions.Embed +namespace Geekbot.Interactions.Embed { /// public class Embed diff --git a/src/Core/Interactions/Embed/EmbedAuthor.cs b/src/Interactions/Embed/EmbedAuthor.cs similarity index 91% rename from src/Core/Interactions/Embed/EmbedAuthor.cs rename to src/Interactions/Embed/EmbedAuthor.cs index 1204cf9..68eadb8 100644 --- a/src/Core/Interactions/Embed/EmbedAuthor.cs +++ b/src/Interactions/Embed/EmbedAuthor.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Embed +namespace Geekbot.Interactions.Embed { public record EmbedAuthor { diff --git a/src/Core/Interactions/Embed/EmbedField.cs b/src/Interactions/Embed/EmbedField.cs similarity index 91% rename from src/Core/Interactions/Embed/EmbedField.cs rename to src/Interactions/Embed/EmbedField.cs index 6e56b8e..5b538ce 100644 --- a/src/Core/Interactions/Embed/EmbedField.cs +++ b/src/Interactions/Embed/EmbedField.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Embed +namespace Geekbot.Interactions.Embed { /// public record EmbedField diff --git a/src/Core/Interactions/Embed/EmbedFooter.cs b/src/Interactions/Embed/EmbedFooter.cs similarity index 91% rename from src/Core/Interactions/Embed/EmbedFooter.cs rename to src/Interactions/Embed/EmbedFooter.cs index f35097f..cb7b188 100644 --- a/src/Core/Interactions/Embed/EmbedFooter.cs +++ b/src/Interactions/Embed/EmbedFooter.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Embed +namespace Geekbot.Interactions.Embed { /// public record EmbedFooter diff --git a/src/Core/Interactions/Embed/EmbedImage.cs b/src/Interactions/Embed/EmbedImage.cs similarity index 92% rename from src/Core/Interactions/Embed/EmbedImage.cs rename to src/Interactions/Embed/EmbedImage.cs index 3ffa9e5..4259f2f 100644 --- a/src/Core/Interactions/Embed/EmbedImage.cs +++ b/src/Interactions/Embed/EmbedImage.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Embed +namespace Geekbot.Interactions.Embed { /// public record EmbedImage diff --git a/src/Core/Interactions/Embed/EmbedProvider.cs b/src/Interactions/Embed/EmbedProvider.cs similarity index 89% rename from src/Core/Interactions/Embed/EmbedProvider.cs rename to src/Interactions/Embed/EmbedProvider.cs index 022bfee..a414032 100644 --- a/src/Core/Interactions/Embed/EmbedProvider.cs +++ b/src/Interactions/Embed/EmbedProvider.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Embed +namespace Geekbot.Interactions.Embed { /// public record EmbedProvider diff --git a/src/Core/Interactions/Embed/EmbedThumbnail.cs b/src/Interactions/Embed/EmbedThumbnail.cs similarity index 92% rename from src/Core/Interactions/Embed/EmbedThumbnail.cs rename to src/Interactions/Embed/EmbedThumbnail.cs index 25d0182..dd13ba0 100644 --- a/src/Core/Interactions/Embed/EmbedThumbnail.cs +++ b/src/Interactions/Embed/EmbedThumbnail.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Embed +namespace Geekbot.Interactions.Embed { /// public record EmbedThumbnail diff --git a/src/Core/Interactions/Embed/EmbedTypes.cs b/src/Interactions/Embed/EmbedTypes.cs similarity index 93% rename from src/Core/Interactions/Embed/EmbedTypes.cs rename to src/Interactions/Embed/EmbedTypes.cs index c787e36..e3994c8 100644 --- a/src/Core/Interactions/Embed/EmbedTypes.cs +++ b/src/Interactions/Embed/EmbedTypes.cs @@ -1,7 +1,7 @@ using System.Runtime.Serialization; using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Embed +namespace Geekbot.Interactions.Embed { /// /// Embed types are "loosely defined" and, for the most part, are not used by our clients for rendering. diff --git a/src/Core/Interactions/Embed/EmbedVideo.cs b/src/Interactions/Embed/EmbedVideo.cs similarity index 91% rename from src/Core/Interactions/Embed/EmbedVideo.cs rename to src/Interactions/Embed/EmbedVideo.cs index 5d44f73..81989b8 100644 --- a/src/Core/Interactions/Embed/EmbedVideo.cs +++ b/src/Interactions/Embed/EmbedVideo.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Embed +namespace Geekbot.Interactions.Embed { /// public record EmbedVideo diff --git a/src/Core/Interactions/IInteractionBase.cs b/src/Interactions/IInteractionBase.cs similarity index 67% rename from src/Core/Interactions/IInteractionBase.cs rename to src/Interactions/IInteractionBase.cs index 4dd8eb7..6709a05 100644 --- a/src/Core/Interactions/IInteractionBase.cs +++ b/src/Interactions/IInteractionBase.cs @@ -1,8 +1,7 @@ -using System; -using Geekbot.Core.Interactions.Request; -using Geekbot.Core.Interactions.Response; +using Geekbot.Interactions.Request; +using Geekbot.Interactions.Response; -namespace Geekbot.Core.Interactions +namespace Geekbot.Interactions { public interface IInteractionBase { diff --git a/src/Interactions/IInteractionCommandManager.cs b/src/Interactions/IInteractionCommandManager.cs new file mode 100644 index 0000000..2f30fce --- /dev/null +++ b/src/Interactions/IInteractionCommandManager.cs @@ -0,0 +1,12 @@ +using Geekbot.Interactions.ApplicationCommand; +using Geekbot.Interactions.Request; +using Geekbot.Interactions.Response; + +namespace Geekbot.Interactions +{ + public interface IInteractionCommandManager + { + Dictionary CommandsInfo { get; init; } + Task RunCommand(Interaction interaction); + } +} \ No newline at end of file diff --git a/src/Core/Interactions/InteractionBase.cs b/src/Interactions/InteractionBase.cs similarity index 88% rename from src/Core/Interactions/InteractionBase.cs rename to src/Interactions/InteractionBase.cs index e0735d3..f7ec684 100644 --- a/src/Core/Interactions/InteractionBase.cs +++ b/src/Interactions/InteractionBase.cs @@ -1,11 +1,10 @@ -using System; -using System.Threading.Tasks; -using Geekbot.Core.Interactions.ApplicationCommand; -using Geekbot.Core.Interactions.Request; -using Geekbot.Core.Interactions.Response; +using Geekbot.Interactions.ApplicationCommand; +using Geekbot.Interactions.Request; +using Geekbot.Interactions.Response; using Sentry; +using Localization = Geekbot.Core.Localization; -namespace Geekbot.Core.Interactions +namespace Geekbot.Interactions { public abstract class InteractionBase : IInteractionBase { diff --git a/src/Core/Interactions/InteractionCommandManager.cs b/src/Interactions/InteractionCommandManager.cs similarity index 88% rename from src/Core/Interactions/InteractionCommandManager.cs rename to src/Interactions/InteractionCommandManager.cs index ec40c00..ac0e9e1 100644 --- a/src/Core/Interactions/InteractionCommandManager.cs +++ b/src/Interactions/InteractionCommandManager.cs @@ -1,17 +1,12 @@ -using System; -using System.Collections.Generic; using System.Globalization; -using System.Linq; using System.Reflection; -using System.Threading; -using System.Threading.Tasks; using Geekbot.Core.GuildSettingsManager; -using Geekbot.Core.Interactions.ApplicationCommand; -using Geekbot.Core.Interactions.Request; -using Geekbot.Core.Interactions.Response; +using Geekbot.Interactions.ApplicationCommand; +using Geekbot.Interactions.Request; +using Geekbot.Interactions.Response; using Microsoft.Extensions.DependencyInjection; -namespace Geekbot.Core.Interactions +namespace Geekbot.Interactions { public class InteractionCommandManager : IInteractionCommandManager { diff --git a/src/Interactions/Interactions.csproj b/src/Interactions/Interactions.csproj new file mode 100644 index 0000000..2b993d0 --- /dev/null +++ b/src/Interactions/Interactions.csproj @@ -0,0 +1,21 @@ + + + + net6.0 + win10-x64;linux-x64;linux-musl-x64 + $(VersionSuffix) + $(VersionSuffix) + 0.0.0-DEV + Geekbot.Interactions + Geekbot.Interactions + NU1701 + CS8618 + enable + enable + + + + + + + diff --git a/src/Core/Interactions/MessageComponents/ButtonStyle.cs b/src/Interactions/MessageComponents/ButtonStyle.cs similarity index 88% rename from src/Core/Interactions/MessageComponents/ButtonStyle.cs rename to src/Interactions/MessageComponents/ButtonStyle.cs index 2f9e18d..7821a9b 100644 --- a/src/Core/Interactions/MessageComponents/ButtonStyle.cs +++ b/src/Interactions/MessageComponents/ButtonStyle.cs @@ -1,4 +1,4 @@ -namespace Geekbot.Core.Interactions.MessageComponents +namespace Geekbot.Interactions.MessageComponents { /// public enum ButtonStyle diff --git a/src/Core/Interactions/MessageComponents/Component.cs b/src/Interactions/MessageComponents/Component.cs similarity index 94% rename from src/Core/Interactions/MessageComponents/Component.cs rename to src/Interactions/MessageComponents/Component.cs index e3eefc4..064458a 100644 --- a/src/Core/Interactions/MessageComponents/Component.cs +++ b/src/Interactions/MessageComponents/Component.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.MessageComponents +namespace Geekbot.Interactions.MessageComponents { /// public record Component diff --git a/src/Core/Interactions/MessageComponents/ComponentEmoji.cs b/src/Interactions/MessageComponents/ComponentEmoji.cs similarity index 91% rename from src/Core/Interactions/MessageComponents/ComponentEmoji.cs rename to src/Interactions/MessageComponents/ComponentEmoji.cs index 81da848..3e3510e 100644 --- a/src/Core/Interactions/MessageComponents/ComponentEmoji.cs +++ b/src/Interactions/MessageComponents/ComponentEmoji.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.MessageComponents +namespace Geekbot.Interactions.MessageComponents { /// /// Partial emoji with just id, name, and animated diff --git a/src/Core/Interactions/MessageComponents/ComponentType.cs b/src/Interactions/MessageComponents/ComponentType.cs similarity index 87% rename from src/Core/Interactions/MessageComponents/ComponentType.cs rename to src/Interactions/MessageComponents/ComponentType.cs index 11e82ec..1a96514 100644 --- a/src/Core/Interactions/MessageComponents/ComponentType.cs +++ b/src/Interactions/MessageComponents/ComponentType.cs @@ -1,4 +1,4 @@ -namespace Geekbot.Core.Interactions.MessageComponents +namespace Geekbot.Interactions.MessageComponents { /// public enum ComponentType diff --git a/src/Core/Interactions/MessageComponents/SelectOption.cs b/src/Interactions/MessageComponents/SelectOption.cs similarity index 92% rename from src/Core/Interactions/MessageComponents/SelectOption.cs rename to src/Interactions/MessageComponents/SelectOption.cs index 01bc6d2..ec0bda6 100644 --- a/src/Core/Interactions/MessageComponents/SelectOption.cs +++ b/src/Interactions/MessageComponents/SelectOption.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.MessageComponents +namespace Geekbot.Interactions.MessageComponents { /// public record SelectOption diff --git a/src/Core/Interactions/Request/Interaction.cs b/src/Interactions/Request/Interaction.cs similarity index 90% rename from src/Core/Interactions/Request/Interaction.cs rename to src/Interactions/Request/Interaction.cs index 568965f..b66577f 100644 --- a/src/Core/Interactions/Request/Interaction.cs +++ b/src/Interactions/Request/Interaction.cs @@ -1,9 +1,7 @@ -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; -using Geekbot.Core.Interactions.Resolved; +using Geekbot.Interactions.Resolved; -namespace Geekbot.Core.Interactions.Request +namespace Geekbot.Interactions.Request { /// public record Interaction diff --git a/src/Core/Interactions/Request/InteractionData.cs b/src/Interactions/Request/InteractionData.cs similarity index 91% rename from src/Core/Interactions/Request/InteractionData.cs rename to src/Interactions/Request/InteractionData.cs index 2495ebf..7ef6b12 100644 --- a/src/Core/Interactions/Request/InteractionData.cs +++ b/src/Interactions/Request/InteractionData.cs @@ -1,9 +1,8 @@ -using System.Collections.Generic; using System.Text.Json.Serialization; -using Geekbot.Core.Interactions.ApplicationCommand; -using Geekbot.Core.Interactions.MessageComponents; +using Geekbot.Interactions.ApplicationCommand; +using Geekbot.Interactions.MessageComponents; -namespace Geekbot.Core.Interactions.Request +namespace Geekbot.Interactions.Request { /// public class InteractionData diff --git a/src/Core/Interactions/Request/InteractionOption.cs b/src/Interactions/Request/InteractionOption.cs similarity index 86% rename from src/Core/Interactions/Request/InteractionOption.cs rename to src/Interactions/Request/InteractionOption.cs index 6e94d67..ca63522 100644 --- a/src/Core/Interactions/Request/InteractionOption.cs +++ b/src/Interactions/Request/InteractionOption.cs @@ -1,9 +1,8 @@ -using System.Collections.Generic; using System.Text.Json; using System.Text.Json.Serialization; -using Geekbot.Core.Interactions.ApplicationCommand; +using Geekbot.Interactions.ApplicationCommand; -namespace Geekbot.Core.Interactions.Request +namespace Geekbot.Interactions.Request { /// public record InteractionOption diff --git a/src/Core/Interactions/Request/InteractionResolvedData.cs b/src/Interactions/Request/InteractionResolvedData.cs similarity index 81% rename from src/Core/Interactions/Request/InteractionResolvedData.cs rename to src/Interactions/Request/InteractionResolvedData.cs index c2f3a42..1ba8993 100644 --- a/src/Core/Interactions/Request/InteractionResolvedData.cs +++ b/src/Interactions/Request/InteractionResolvedData.cs @@ -1,8 +1,7 @@ -using System.Collections.Generic; using System.Text.Json.Serialization; -using Geekbot.Core.Interactions.Resolved; +using Geekbot.Interactions.Resolved; -namespace Geekbot.Core.Interactions.Request +namespace Geekbot.Interactions.Request { public class InteractionResolvedData { diff --git a/src/Core/Interactions/Request/InteractionType.cs b/src/Interactions/Request/InteractionType.cs similarity index 83% rename from src/Core/Interactions/Request/InteractionType.cs rename to src/Interactions/Request/InteractionType.cs index a7105e8..2c12ae7 100644 --- a/src/Core/Interactions/Request/InteractionType.cs +++ b/src/Interactions/Request/InteractionType.cs @@ -1,4 +1,4 @@ -namespace Geekbot.Core.Interactions.Request +namespace Geekbot.Interactions.Request { /// public enum InteractionType diff --git a/src/Core/Interactions/Resolved/Attachment.cs b/src/Interactions/Resolved/Attachment.cs similarity index 91% rename from src/Core/Interactions/Resolved/Attachment.cs rename to src/Interactions/Resolved/Attachment.cs index 9b6128c..3a2b59b 100644 --- a/src/Core/Interactions/Resolved/Attachment.cs +++ b/src/Interactions/Resolved/Attachment.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Resolved +namespace Geekbot.Interactions.Resolved { public record Attachment { diff --git a/src/Core/Interactions/Resolved/Channel.cs b/src/Interactions/Resolved/Channel.cs similarity index 90% rename from src/Core/Interactions/Resolved/Channel.cs rename to src/Interactions/Resolved/Channel.cs index ac583f6..60a33e5 100644 --- a/src/Core/Interactions/Resolved/Channel.cs +++ b/src/Interactions/Resolved/Channel.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Resolved +namespace Geekbot.Interactions.Resolved { public record Channel { diff --git a/src/Core/Interactions/Resolved/ChannelType.cs b/src/Interactions/Resolved/ChannelType.cs similarity index 84% rename from src/Core/Interactions/Resolved/ChannelType.cs rename to src/Interactions/Resolved/ChannelType.cs index 1663bec..9fb514d 100644 --- a/src/Core/Interactions/Resolved/ChannelType.cs +++ b/src/Interactions/Resolved/ChannelType.cs @@ -1,4 +1,4 @@ -namespace Geekbot.Core.Interactions.Resolved +namespace Geekbot.Interactions.Resolved { public enum ChannelType { diff --git a/src/Core/Interactions/Resolved/Emoji.cs b/src/Interactions/Resolved/Emoji.cs similarity index 87% rename from src/Core/Interactions/Resolved/Emoji.cs rename to src/Interactions/Resolved/Emoji.cs index 9c3f745..017ac1e 100644 --- a/src/Core/Interactions/Resolved/Emoji.cs +++ b/src/Interactions/Resolved/Emoji.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Resolved +namespace Geekbot.Interactions.Resolved { public record Emoji { diff --git a/src/Core/Interactions/Resolved/Member.cs b/src/Interactions/Resolved/Member.cs similarity index 85% rename from src/Core/Interactions/Resolved/Member.cs rename to src/Interactions/Resolved/Member.cs index 1ebec70..dc60807 100644 --- a/src/Core/Interactions/Resolved/Member.cs +++ b/src/Interactions/Resolved/Member.cs @@ -1,8 +1,6 @@ -using System; -using System.Collections.Generic; using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Resolved +namespace Geekbot.Interactions.Resolved { public record Member { diff --git a/src/Core/Interactions/Resolved/Message.cs b/src/Interactions/Resolved/Message.cs similarity index 94% rename from src/Core/Interactions/Resolved/Message.cs rename to src/Interactions/Resolved/Message.cs index 6486928..22b1e55 100644 --- a/src/Core/Interactions/Resolved/Message.cs +++ b/src/Interactions/Resolved/Message.cs @@ -1,8 +1,6 @@ -using System; -using System.Collections.Generic; using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Resolved +namespace Geekbot.Interactions.Resolved { public record Message { diff --git a/src/Core/Interactions/Resolved/MessageInteraction.cs b/src/Interactions/Resolved/MessageInteraction.cs similarity index 80% rename from src/Core/Interactions/Resolved/MessageInteraction.cs rename to src/Interactions/Resolved/MessageInteraction.cs index 13a39a8..578372e 100644 --- a/src/Core/Interactions/Resolved/MessageInteraction.cs +++ b/src/Interactions/Resolved/MessageInteraction.cs @@ -1,7 +1,7 @@ using System.Text.Json.Serialization; -using Geekbot.Core.Interactions.Request; +using Geekbot.Interactions.Request; -namespace Geekbot.Core.Interactions.Resolved +namespace Geekbot.Interactions.Resolved { public record MessageInteraction { diff --git a/src/Core/Interactions/Resolved/MessageType.cs b/src/Interactions/Resolved/MessageType.cs similarity index 92% rename from src/Core/Interactions/Resolved/MessageType.cs rename to src/Interactions/Resolved/MessageType.cs index 74ce4b3..9acdbee 100644 --- a/src/Core/Interactions/Resolved/MessageType.cs +++ b/src/Interactions/Resolved/MessageType.cs @@ -1,4 +1,4 @@ -namespace Geekbot.Core.Interactions.Resolved +namespace Geekbot.Interactions.Resolved { public enum MessageType { diff --git a/src/Core/Interactions/Resolved/Reaction.cs b/src/Interactions/Resolved/Reaction.cs similarity index 84% rename from src/Core/Interactions/Resolved/Reaction.cs rename to src/Interactions/Resolved/Reaction.cs index ce92bc4..9976b46 100644 --- a/src/Core/Interactions/Resolved/Reaction.cs +++ b/src/Interactions/Resolved/Reaction.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Resolved +namespace Geekbot.Interactions.Resolved { public struct Reaction { diff --git a/src/Core/Interactions/Resolved/Role.cs b/src/Interactions/Resolved/Role.cs similarity index 91% rename from src/Core/Interactions/Resolved/Role.cs rename to src/Interactions/Resolved/Role.cs index 253be93..d2343cf 100644 --- a/src/Core/Interactions/Resolved/Role.cs +++ b/src/Interactions/Resolved/Role.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Resolved +namespace Geekbot.Interactions.Resolved { public record Role { diff --git a/src/Core/Interactions/Resolved/RoleTag.cs b/src/Interactions/Resolved/RoleTag.cs similarity index 86% rename from src/Core/Interactions/Resolved/RoleTag.cs rename to src/Interactions/Resolved/RoleTag.cs index 8a3f1fa..bf8efab 100644 --- a/src/Core/Interactions/Resolved/RoleTag.cs +++ b/src/Interactions/Resolved/RoleTag.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Resolved +namespace Geekbot.Interactions.Resolved { public record RoleTag { diff --git a/src/Core/Interactions/Resolved/ThreadMetadata.cs b/src/Interactions/Resolved/ThreadMetadata.cs similarity index 87% rename from src/Core/Interactions/Resolved/ThreadMetadata.cs rename to src/Interactions/Resolved/ThreadMetadata.cs index a58bf81..499c51e 100644 --- a/src/Core/Interactions/Resolved/ThreadMetadata.cs +++ b/src/Interactions/Resolved/ThreadMetadata.cs @@ -1,7 +1,6 @@ -using System; using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Resolved +namespace Geekbot.Interactions.Resolved { public record ThreadMetadata { diff --git a/src/Core/Interactions/Resolved/User.cs b/src/Interactions/Resolved/User.cs similarity index 94% rename from src/Core/Interactions/Resolved/User.cs rename to src/Interactions/Resolved/User.cs index f9cc657..6d4e199 100644 --- a/src/Core/Interactions/Resolved/User.cs +++ b/src/Interactions/Resolved/User.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Resolved +namespace Geekbot.Interactions.Resolved { public class User { diff --git a/src/Core/Interactions/Response/InteractionResponse.cs b/src/Interactions/Response/InteractionResponse.cs similarity index 92% rename from src/Core/Interactions/Response/InteractionResponse.cs rename to src/Interactions/Response/InteractionResponse.cs index c3bbf9c..a54b37a 100644 --- a/src/Core/Interactions/Response/InteractionResponse.cs +++ b/src/Interactions/Response/InteractionResponse.cs @@ -1,6 +1,6 @@ using System.Text.Json.Serialization; -namespace Geekbot.Core.Interactions.Response +namespace Geekbot.Interactions.Response { /// /// Interactions--both receiving and responding--are webhooks under the hood. So responding to an Interaction is just like sending a webhook request! diff --git a/src/Core/Interactions/Response/InteractionResponseData.cs b/src/Interactions/Response/InteractionResponseData.cs similarity index 85% rename from src/Core/Interactions/Response/InteractionResponseData.cs rename to src/Interactions/Response/InteractionResponseData.cs index e635498..aae0807 100644 --- a/src/Core/Interactions/Response/InteractionResponseData.cs +++ b/src/Interactions/Response/InteractionResponseData.cs @@ -1,10 +1,8 @@ -using System.Collections.Generic; using System.Text.Json.Serialization; using Discord; -using Geekbot.Core.Interactions.MessageComponents; -using Embed = Geekbot.Core.Interactions.Embed.Embed; +using Geekbot.Interactions.MessageComponents; -namespace Geekbot.Core.Interactions.Response +namespace Geekbot.Interactions.Response { /// /// Not all message fields are currently supported. diff --git a/src/Core/Interactions/Response/InteractionResponseType.cs b/src/Interactions/Response/InteractionResponseType.cs similarity index 93% rename from src/Core/Interactions/Response/InteractionResponseType.cs rename to src/Interactions/Response/InteractionResponseType.cs index 5c7cd5a..4a2a7ce 100644 --- a/src/Core/Interactions/Response/InteractionResponseType.cs +++ b/src/Interactions/Response/InteractionResponseType.cs @@ -1,4 +1,4 @@ -namespace Geekbot.Core.Interactions.Response +namespace Geekbot.Interactions.Response { /// public enum InteractionResponseType diff --git a/src/Web/Commands/Karma.cs b/src/Web/Commands/Karma.cs index f6ae690..bdbe22d 100644 --- a/src/Web/Commands/Karma.cs +++ b/src/Web/Commands/Karma.cs @@ -1,9 +1,9 @@ using Geekbot.Commands.Karma; using Geekbot.Core.Database; -using Geekbot.Core.Interactions; -using Geekbot.Core.Interactions.ApplicationCommand; -using Geekbot.Core.Interactions.Request; -using Geekbot.Core.Interactions.Response; +using Geekbot.Interactions; +using Geekbot.Interactions.ApplicationCommand; +using Geekbot.Interactions.Request; +using Geekbot.Interactions.Response; namespace Geekbot.Web.Commands; diff --git a/src/Web/Commands/KarmaUserBad.cs b/src/Web/Commands/KarmaUserBad.cs index bf4962a..0c62aec 100644 --- a/src/Web/Commands/KarmaUserBad.cs +++ b/src/Web/Commands/KarmaUserBad.cs @@ -1,9 +1,9 @@ using Geekbot.Commands.Karma; using Geekbot.Core.Database; -using Geekbot.Core.Interactions; -using Geekbot.Core.Interactions.ApplicationCommand; -using Geekbot.Core.Interactions.Request; -using Geekbot.Core.Interactions.Response; +using Geekbot.Interactions; +using Geekbot.Interactions.ApplicationCommand; +using Geekbot.Interactions.Request; +using Geekbot.Interactions.Response; namespace Geekbot.Web.Commands; diff --git a/src/Web/Commands/KarmaUserGood.cs b/src/Web/Commands/KarmaUserGood.cs index 8bd2683..42febfa 100644 --- a/src/Web/Commands/KarmaUserGood.cs +++ b/src/Web/Commands/KarmaUserGood.cs @@ -1,9 +1,9 @@ using Geekbot.Commands.Karma; using Geekbot.Core.Database; -using Geekbot.Core.Interactions; -using Geekbot.Core.Interactions.ApplicationCommand; -using Geekbot.Core.Interactions.Request; -using Geekbot.Core.Interactions.Response; +using Geekbot.Interactions; +using Geekbot.Interactions.ApplicationCommand; +using Geekbot.Interactions.Request; +using Geekbot.Interactions.Response; namespace Geekbot.Web.Commands; diff --git a/src/Web/Commands/KarmaUserNeutral.cs b/src/Web/Commands/KarmaUserNeutral.cs index 8c1274b..3f237fd 100644 --- a/src/Web/Commands/KarmaUserNeutral.cs +++ b/src/Web/Commands/KarmaUserNeutral.cs @@ -1,9 +1,9 @@ using Geekbot.Commands.Karma; using Geekbot.Core.Database; -using Geekbot.Core.Interactions; -using Geekbot.Core.Interactions.ApplicationCommand; -using Geekbot.Core.Interactions.Request; -using Geekbot.Core.Interactions.Response; +using Geekbot.Interactions; +using Geekbot.Interactions.ApplicationCommand; +using Geekbot.Interactions.Request; +using Geekbot.Interactions.Response; namespace Geekbot.Web.Commands; diff --git a/src/Web/Commands/Rank.cs b/src/Web/Commands/Rank.cs index 65cba10..276f841 100644 --- a/src/Web/Commands/Rank.cs +++ b/src/Web/Commands/Rank.cs @@ -1,10 +1,10 @@ using Geekbot.Core.Converters; using Geekbot.Core.Database; using Geekbot.Core.Highscores; -using Geekbot.Core.Interactions; -using Geekbot.Core.Interactions.ApplicationCommand; -using Geekbot.Core.Interactions.Request; -using Geekbot.Core.Interactions.Response; +using Geekbot.Interactions; +using Geekbot.Interactions.ApplicationCommand; +using Geekbot.Interactions.Request; +using Geekbot.Interactions.Response; namespace Geekbot.Web.Commands; diff --git a/src/Web/Commands/Roll.cs b/src/Web/Commands/Roll.cs index db0fd00..667e3cd 100644 --- a/src/Web/Commands/Roll.cs +++ b/src/Web/Commands/Roll.cs @@ -1,8 +1,8 @@ using Geekbot.Core.Database; -using Geekbot.Core.Interactions; -using Geekbot.Core.Interactions.ApplicationCommand; -using Geekbot.Core.Interactions.Request; -using Geekbot.Core.Interactions.Response; +using Geekbot.Interactions; +using Geekbot.Interactions.ApplicationCommand; +using Geekbot.Interactions.Request; +using Geekbot.Interactions.Response; using Geekbot.Core.KvInMemoryStore; using Geekbot.Core.RandomNumberGenerator; diff --git a/src/Web/Commands/UrbanDictionary.cs b/src/Web/Commands/UrbanDictionary.cs index 53f20f6..a0be64e 100644 --- a/src/Web/Commands/UrbanDictionary.cs +++ b/src/Web/Commands/UrbanDictionary.cs @@ -1,7 +1,7 @@ -using Geekbot.Core.Interactions; -using Geekbot.Core.Interactions.ApplicationCommand; -using Geekbot.Core.Interactions.Request; -using Geekbot.Core.Interactions.Response; +using Geekbot.Interactions; +using Geekbot.Interactions.ApplicationCommand; +using Geekbot.Interactions.Request; +using Geekbot.Interactions.Response; namespace Geekbot.Web.Commands; diff --git a/src/Web/Controllers/Interactions/InteractionController.cs b/src/Web/Controllers/Interactions/InteractionController.cs index 0f9cf4f..5ed34f0 100644 --- a/src/Web/Controllers/Interactions/InteractionController.cs +++ b/src/Web/Controllers/Interactions/InteractionController.cs @@ -1,9 +1,9 @@ using System.Text; using System.Text.Json; using Geekbot.Core.GlobalSettings; -using Geekbot.Core.Interactions; -using Geekbot.Core.Interactions.Request; -using Geekbot.Core.Interactions.Response; +using Geekbot.Interactions; +using Geekbot.Interactions.Request; +using Geekbot.Interactions.Response; using Microsoft.AspNetCore.Mvc; using Sodium; diff --git a/src/Web/Controllers/Interactions/InteractionRegistrarController.cs b/src/Web/Controllers/Interactions/InteractionRegistrarController.cs index 5673ca3..fc29e14 100644 --- a/src/Web/Controllers/Interactions/InteractionRegistrarController.cs +++ b/src/Web/Controllers/Interactions/InteractionRegistrarController.cs @@ -1,8 +1,8 @@ using System.Net.Http.Headers; using Geekbot.Core; using Geekbot.Core.GlobalSettings; -using Geekbot.Core.Interactions; -using Geekbot.Core.Interactions.ApplicationCommand; +using Geekbot.Interactions; +using Geekbot.Interactions.ApplicationCommand; using Geekbot.Core.Logger; using Geekbot.Web.Controllers.Interactions.Model; using Microsoft.AspNetCore.Mvc; diff --git a/src/Web/Controllers/Interactions/Model/InteractionRegistrationOperations.cs b/src/Web/Controllers/Interactions/Model/InteractionRegistrationOperations.cs index 2eb6cd5..f414697 100644 --- a/src/Web/Controllers/Interactions/Model/InteractionRegistrationOperations.cs +++ b/src/Web/Controllers/Interactions/Model/InteractionRegistrationOperations.cs @@ -1,4 +1,4 @@ -using Geekbot.Core.Interactions.ApplicationCommand; +using Geekbot.Interactions.ApplicationCommand; namespace Geekbot.Web.Controllers.Interactions.Model; diff --git a/src/Web/Controllers/Interactions/Model/RegisteredInteraction.cs b/src/Web/Controllers/Interactions/Model/RegisteredInteraction.cs index 702f75f..579ee98 100644 --- a/src/Web/Controllers/Interactions/Model/RegisteredInteraction.cs +++ b/src/Web/Controllers/Interactions/Model/RegisteredInteraction.cs @@ -1,5 +1,5 @@ using System.Text.Json.Serialization; -using Geekbot.Core.Interactions.Request; +using Geekbot.Interactions.Request; namespace Geekbot.Web.Controllers.Interactions.Model; diff --git a/src/Web/Web.csproj b/src/Web/Web.csproj index 3a077fb..0f2cd54 100644 --- a/src/Web/Web.csproj +++ b/src/Web/Web.csproj @@ -18,6 +18,7 @@ + diff --git a/src/Web/WebApiStartup.cs b/src/Web/WebApiStartup.cs index fcf90f6..cdcec64 100644 --- a/src/Web/WebApiStartup.cs +++ b/src/Web/WebApiStartup.cs @@ -6,8 +6,8 @@ using Geekbot.Core.Database; using Geekbot.Core.GlobalSettings; using Geekbot.Core.GuildSettingsManager; using Geekbot.Core.Highscores; -using Geekbot.Core.Interactions; using Geekbot.Core.Logger; +using Geekbot.Interactions; using Geekbot.Web.Logging; namespace Geekbot.Web;