From 3f6c013a6be70806a710d67bf0ce1901a96b4062 Mon Sep 17 00:00:00 2001 From: Zane Pereira Date: Sun, 19 May 2024 22:37:35 +0530 Subject: [PATCH] Add guild_scheduled_event_id to create stage endpoint (#117) --- .../Content/Json/CreateStageInstanceJsonRestRequestContent.cs | 3 +++ .../ActionProperties/Create/CreateStageActionProperties.cs | 4 +++- src/Disqord.Rest/Extensions/RestClientExtensions.Stages.cs | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Disqord.Rest.Api/Content/Json/CreateStageInstanceJsonRestRequestContent.cs b/src/Disqord.Rest.Api/Content/Json/CreateStageInstanceJsonRestRequestContent.cs index 846dd85b3..f275a0796 100644 --- a/src/Disqord.Rest.Api/Content/Json/CreateStageInstanceJsonRestRequestContent.cs +++ b/src/Disqord.Rest.Api/Content/Json/CreateStageInstanceJsonRestRequestContent.cs @@ -16,4 +16,7 @@ public class CreateStageInstanceJsonRestRequestContent : JsonModelRestRequestCon [JsonProperty("send_start_notification")] public Optional SendStartNotification; + + [JsonProperty("guild_scheduled_event_id")] + public Optional GuildScheduledEventId; } diff --git a/src/Disqord.Rest/ActionProperties/Create/CreateStageActionProperties.cs b/src/Disqord.Rest/ActionProperties/Create/CreateStageActionProperties.cs index b2a2b2085..afb71ec52 100644 --- a/src/Disqord.Rest/ActionProperties/Create/CreateStageActionProperties.cs +++ b/src/Disqord.Rest/ActionProperties/Create/CreateStageActionProperties.cs @@ -7,4 +7,6 @@ public sealed class CreateStageActionProperties public Optional PrivacyLevel { internal get; set; } public Optional NotifyEveryone { internal get; set; } -} \ No newline at end of file + + public Optional GuildScheduledEventId { internal get; set; } +} diff --git a/src/Disqord.Rest/Extensions/RestClientExtensions.Stages.cs b/src/Disqord.Rest/Extensions/RestClientExtensions.Stages.cs index c1f665631..ab44a4a96 100644 --- a/src/Disqord.Rest/Extensions/RestClientExtensions.Stages.cs +++ b/src/Disqord.Rest/Extensions/RestClientExtensions.Stages.cs @@ -21,7 +21,8 @@ public static async Task CreateStageAsync(this IRestClient client, ChannelId = channelId, Topic = topic, PrivacyLevel = properties.PrivacyLevel, - SendStartNotification = properties.NotifyEveryone + SendStartNotification = properties.NotifyEveryone, + GuildScheduledEventId = properties.GuildScheduledEventId }; var model = await client.ApiClient.CreateStageInstanceAsync(channelId, content, options, cancellationToken).ConfigureAwait(false);