From 72860859e08b2c5837187203a04869a31290e37f Mon Sep 17 00:00:00 2001 From: d4n Date: Tue, 26 Mar 2024 11:44:38 -0500 Subject: [PATCH] Add user app support --- src/Fergun.csproj | 2 +- src/Modules/ImageModule.cs | 2 ++ src/Modules/OcrModule.cs | 2 ++ src/Modules/OtherModule.cs | 2 ++ src/Modules/TtsModule.cs | 2 ++ src/Modules/UrbanModule.cs | 2 ++ src/Modules/UtilityModule.cs | 2 ++ 7 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Fergun.csproj b/src/Fergun.csproj index 161dbbf..5794dcb 100644 --- a/src/Fergun.csproj +++ b/src/Fergun.csproj @@ -12,7 +12,7 @@ - + diff --git a/src/Modules/ImageModule.cs b/src/Modules/ImageModule.cs index 7cde77a..7c123d1 100644 --- a/src/Modules/ImageModule.cs +++ b/src/Modules/ImageModule.cs @@ -24,6 +24,8 @@ namespace Fergun.Modules; +[CommandContextType(InteractionContextType.BotDm, InteractionContextType.PrivateChannel, InteractionContextType.Guild)] +[IntegrationType(ApplicationIntegrationType.UserInstall, ApplicationIntegrationType.GuildInstall)] [Ratelimit(2, Constants.GlobalRatelimitPeriod)] [Group("img", "Image search commands.")] public class ImageModule : InteractionModuleBase diff --git a/src/Modules/OcrModule.cs b/src/Modules/OcrModule.cs index 4c98fdc..5701f5d 100644 --- a/src/Modules/OcrModule.cs +++ b/src/Modules/OcrModule.cs @@ -14,6 +14,8 @@ namespace Fergun.Modules; +[CommandContextType(InteractionContextType.BotDm, InteractionContextType.PrivateChannel, InteractionContextType.Guild)] +[IntegrationType(ApplicationIntegrationType.UserInstall, ApplicationIntegrationType.GuildInstall)] [Ratelimit(2, 20)] [Group("ocr", "OCR commands.")] public class OcrModule : InteractionModuleBase diff --git a/src/Modules/OtherModule.cs b/src/Modules/OtherModule.cs index 04d01ff..9b84113 100644 --- a/src/Modules/OtherModule.cs +++ b/src/Modules/OtherModule.cs @@ -26,6 +26,8 @@ namespace Fergun.Modules; +[CommandContextType(InteractionContextType.BotDm, InteractionContextType.PrivateChannel, InteractionContextType.Guild)] +[IntegrationType(ApplicationIntegrationType.UserInstall, ApplicationIntegrationType.GuildInstall)] [Ratelimit(Constants.GlobalCommandUsesPerPeriod, Constants.GlobalRatelimitPeriod)] public class OtherModule : InteractionModuleBase { diff --git a/src/Modules/TtsModule.cs b/src/Modules/TtsModule.cs index ee1c074..663918b 100644 --- a/src/Modules/TtsModule.cs +++ b/src/Modules/TtsModule.cs @@ -11,6 +11,8 @@ namespace Fergun.Modules; +[CommandContextType(InteractionContextType.BotDm, InteractionContextType.PrivateChannel, InteractionContextType.Guild)] +[IntegrationType(ApplicationIntegrationType.UserInstall, ApplicationIntegrationType.GuildInstall)] [Ratelimit(2, Constants.GlobalRatelimitPeriod)] [Group("tts", "TTS commands.")] public class TtsModule : InteractionModuleBase diff --git a/src/Modules/UrbanModule.cs b/src/Modules/UrbanModule.cs index 7cbd9d6..f217f3b 100644 --- a/src/Modules/UrbanModule.cs +++ b/src/Modules/UrbanModule.cs @@ -17,6 +17,8 @@ namespace Fergun.Modules; +[CommandContextType(InteractionContextType.BotDm, InteractionContextType.PrivateChannel, InteractionContextType.Guild)] +[IntegrationType(ApplicationIntegrationType.UserInstall, ApplicationIntegrationType.GuildInstall)] [Ratelimit(2, Constants.GlobalRatelimitPeriod)] [Group("urban", "Urban Dictionary commands")] public class UrbanModule : InteractionModuleBase diff --git a/src/Modules/UtilityModule.cs b/src/Modules/UtilityModule.cs index d279245..8da598b 100644 --- a/src/Modules/UtilityModule.cs +++ b/src/Modules/UtilityModule.cs @@ -36,6 +36,8 @@ namespace Fergun.Modules; +[CommandContextType(InteractionContextType.BotDm, InteractionContextType.PrivateChannel, InteractionContextType.Guild)] +[IntegrationType(ApplicationIntegrationType.UserInstall, ApplicationIntegrationType.GuildInstall)] [Ratelimit(Constants.GlobalCommandUsesPerPeriod, Constants.GlobalRatelimitPeriod)] public class UtilityModule : InteractionModuleBase {