From 0f7f9364928a48e1fb5e5cd648891c110a798b58 Mon Sep 17 00:00:00 2001 From: Daan Boerlage Date: Sun, 14 Nov 2021 01:14:26 +0100 Subject: [PATCH] Add explicit nullability for some fields of the Interaction Command record --- src/Interactions/ApplicationCommand/Command.cs | 12 ++++++------ src/Interactions/ApplicationCommand/Option.cs | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Interactions/ApplicationCommand/Command.cs b/src/Interactions/ApplicationCommand/Command.cs index 9f11c11..37a0ffd 100644 --- a/src/Interactions/ApplicationCommand/Command.cs +++ b/src/Interactions/ApplicationCommand/Command.cs @@ -9,7 +9,7 @@ namespace Geekbot.Interactions.ApplicationCommand /// unique id of the command /// [JsonPropertyName("id")] - public string Id { get; set; } + public string? Id { get; set; } /// /// the type of command, defaults 1 if not set @@ -21,13 +21,13 @@ namespace Geekbot.Interactions.ApplicationCommand /// unique id of the parent application /// [JsonPropertyName("application_id")] - public string ApplicationId { get; set; } + public string? ApplicationId { get; set; } /// /// guild id of the command, if not global /// [JsonPropertyName("guild_id")] - public string GuildId { get; set; } + public string? GuildId { get; set; } /// /// 1-32 character name @@ -46,7 +46,7 @@ namespace Geekbot.Interactions.ApplicationCommand /// Exclusive: CHAT_INPUT /// [JsonPropertyName("description")] - public string Description { get; set; } + public string? Description { get; set; } /// /// the parameters for the command, max 25 @@ -55,7 +55,7 @@ namespace Geekbot.Interactions.ApplicationCommand /// Exclusive: CHAT_INPUT /// [JsonPropertyName("options")] - public List [JsonPropertyName("choices")] - public List Choices { get; set; } + public List? Choices { get; set; } /// /// if the option is a subcommand or subcommand group type, this nested options will be the parameters /// [JsonPropertyName("options")] - public List