From f65c572230458bc47213c62dc039f57f43d26c9a Mon Sep 17 00:00:00 2001 From: Lala Sabathil Date: Thu, 9 Nov 2023 01:05:38 +0100 Subject: [PATCH] docs: mark features as experimental --- DisCatSharp.Attributes/Features.cs | 5 ++++- .../DisCatSharpExtensions.cs | 16 ++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/DisCatSharp.Attributes/Features.cs b/DisCatSharp.Attributes/Features.cs index ea9374438..30e7a4fec 100644 --- a/DisCatSharp.Attributes/Features.cs +++ b/DisCatSharp.Attributes/Features.cs @@ -31,7 +31,10 @@ public enum Features : long ServerSubscription = 1<<6, [FeatureDescription("Requires that the application has monetization enabled.")] - MonetizedApplication = 1<<7 + MonetizedApplication = 1<<7, + + [FeatureDescription("Requires that the user and/or guild has a specific experiment and/or treatment.")] + Experiment = 1<<8, } diff --git a/DisCatSharp.Experimental/DisCatSharpExtensions.cs b/DisCatSharp.Experimental/DisCatSharpExtensions.cs index 6f42bd2de..c984a3dd3 100644 --- a/DisCatSharp.Experimental/DisCatSharpExtensions.cs +++ b/DisCatSharp.Experimental/DisCatSharpExtensions.cs @@ -26,7 +26,7 @@ public static async Task GetUsernameAsync(this DiscordClient client, ulo /// /// The discord client. /// The profile id to get. - /// + [RequiresFeature(Features.Override, "This method requires the guild and/or user to have access to clyde with treatment 5.")] // TODO: Change to Features.Experiment public static async Task GetClydeProfileAsync(this DiscordClient client, ulong profileId) { DiscordApiClientHook hook = new(client.ApiClient); @@ -37,6 +37,7 @@ public static async Task GetClydeProfileAsync(this DiscordClient c /// Gets the clyde settings for the given . /// /// The guild to get clyde's settings for. + [RequiresFeature(Features.Override, "This method requires the guild and/or user to have access to clyde with treatment 5.")] // TODO: Change to Features.Experiment public static async Task GetClydeSettingsAsync(this DiscordGuild guild) { DiscordApiClientHook hook = new(guild.Discord.ApiClient); @@ -48,13 +49,23 @@ public static async Task GetClydeSettingsAsync(this DiscordGuild /// /// The guild to modify clyde's settings for. /// The profile id to apply. - /// + [RequiresFeature(Features.Override, "This method requires the guild and/or user to have access to clyde with treatment 5.")] // TODO: Change to Features.Experiment public static async Task ModifyClydeSettingsAsync(this DiscordGuild guild, ulong profileId) { DiscordApiClientHook hook = new(guild.Discord.ApiClient); return await hook.ModifyClydeSettingsAsync(guild.Id, profileId); } + /// + /// Modifies the clyde settings for the given . + /// + /// The guild to modify clyde's settings for. + /// The new name. + /// The new basePersonality. + /// The new avatar. + /// The new banner. + /// The new theme colors. + [RequiresFeature(Features.Override, "This method requires the guild and/or user to have access to clyde with treatment 5.")] // TODO: Change to Features.Experiment public static async Task ModifyClydeSettingsAsync( this DiscordGuild guild, Optional name, @@ -78,6 +89,7 @@ public static async Task ModifyClydeSettingsAsync( /// /// The discord client. /// The base base personality to generate a new one from. + [RequiresFeature(Features.Override, "This method requires the guild and/or user to have access to clyde with treatment 5.")] // TODO: Change to Features.Experiment public static async Task GenerateClydePersonalityAsync(this DiscordClient client, string? basePersonality = null) { DiscordApiClientHook hook = new(client.ApiClient);