diff --git a/src/Discord.Net.Core/Discord.Net.Core.xml b/src/Discord.Net.Core/Discord.Net.Core.xml index 1b55655f8..ebbf93c39 100644 --- a/src/Discord.Net.Core/Discord.Net.Core.xml +++ b/src/Discord.Net.Core/Discord.Net.Core.xml @@ -4875,7 +4875,7 @@ The description of the command. - + Whether the command is enabled by default when the app is added to a guild. @@ -4974,12 +4974,12 @@ The description of this command option, 1-100 character description. - + The first required option for the user to complete--only one option can be default. - + If the parameter is required or optional, default is . diff --git a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommand.cs b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommand.cs index c5f669755..3fe53b72c 100644 --- a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommand.cs +++ b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommand.cs @@ -34,7 +34,7 @@ namespace Discord /// /// Whether the command is enabled by default when the app is added to a guild. /// - bool DefaultPermission { get; } + bool IsDefaultPermission { get; } /// /// If the option is a subcommand or subcommand group type, this nested options will be the parameters. diff --git a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOption.cs b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOption.cs index 79bc5bd62..39bf5418f 100644 --- a/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOption.cs +++ b/src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOption.cs @@ -29,12 +29,12 @@ namespace Discord /// /// The first required option for the user to complete--only one option can be default. /// - bool? Default { get; } + bool? IsDefault { get; } /// /// If the parameter is required or optional, default is . /// - bool? Required { get; } + bool? IsRequired { get; } /// /// Choices for string and int types for the user to pick from. diff --git a/src/Discord.Net.Rest/API/Common/ApplicationCommandOption.cs b/src/Discord.Net.Rest/API/Common/ApplicationCommandOption.cs index 8c617582b..f1c4cce42 100644 --- a/src/Discord.Net.Rest/API/Common/ApplicationCommandOption.cs +++ b/src/Discord.Net.Rest/API/Common/ApplicationCommandOption.cs @@ -50,11 +50,11 @@ namespace Discord.API ChannelTypes = cmd.ChannelTypes.ToArray(); - Required = cmd.Required.HasValue - ? cmd.Required.Value + Required = cmd.IsRequired.HasValue + ? cmd.IsRequired.Value : Optional.Unspecified; - Default = cmd.Default.HasValue - ? cmd.Default.Value + Default = cmd.IsDefault.HasValue + ? cmd.IsDefault.Value : Optional.Unspecified; Name = cmd.Name; diff --git a/src/Discord.Net.Rest/Discord.Net.Rest.xml b/src/Discord.Net.Rest/Discord.Net.Rest.xml index ed31c2381..0c47d29d2 100644 --- a/src/Discord.Net.Rest/Discord.Net.Rest.xml +++ b/src/Discord.Net.Rest/Discord.Net.Rest.xml @@ -4058,7 +4058,7 @@ - + @@ -4103,10 +4103,10 @@ - + - + diff --git a/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommand.cs b/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommand.cs index 9dce4de13..0ef365eb7 100644 --- a/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommand.cs +++ b/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommand.cs @@ -26,7 +26,7 @@ namespace Discord.Rest public string Description { get; private set; } /// - public bool DefaultPermission { get; private set; } + public bool IsDefaultPermission { get; private set; } /// /// The options of this command. @@ -61,7 +61,7 @@ namespace Discord.Rest ApplicationId = model.ApplicationId; Name = model.Name; Description = model.Description; - DefaultPermission = model.DefaultPermissions.GetValueOrDefault(true); + IsDefaultPermission = model.DefaultPermissions.GetValueOrDefault(true); Options = model.Options.IsSpecified ? model.Options.Value.Select(x => RestApplicationCommandOption.Create(x)).ToImmutableArray() diff --git a/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandOption.cs b/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandOption.cs index 60241c372..f3487ae67 100644 --- a/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandOption.cs +++ b/src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandOption.cs @@ -24,10 +24,10 @@ namespace Discord.Rest public string Description { get; private set; } /// - public bool? Default { get; private set; } + public bool? IsDefault { get; private set; } /// - public bool? Required { get; private set; } + public bool? IsRequired { get; private set; } /// /// A collection of 's for this command. @@ -60,10 +60,10 @@ namespace Discord.Rest Description = model.Description; if (model.Default.IsSpecified) - Default = model.Default.Value; + IsDefault = model.Default.Value; if (model.Required.IsSpecified) - Required = model.Required.Value; + IsRequired = model.Required.Value; Options = model.Options.IsSpecified ? model.Options.Value.Select(x => Create(x)).ToImmutableArray() diff --git a/src/Discord.Net.WebSocket/Discord.Net.WebSocket.xml b/src/Discord.Net.WebSocket/Discord.Net.WebSocket.xml index 6ea25ad97..a520d182a 100644 --- a/src/Discord.Net.WebSocket/Discord.Net.WebSocket.xml +++ b/src/Discord.Net.WebSocket/Discord.Net.WebSocket.xml @@ -4120,7 +4120,7 @@ - + @@ -4173,10 +4173,10 @@ - + - + diff --git a/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommand.cs b/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommand.cs index 93518ffb3..2eef2e4ce 100644 --- a/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommand.cs +++ b/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommand.cs @@ -35,7 +35,7 @@ namespace Discord.WebSocket public string Description { get; private set; } /// - public bool DefaultPermission { get; private set; } + public bool IsDefaultPermission { get; private set; } /// /// A collection of 's for this command. @@ -81,7 +81,7 @@ namespace Discord.WebSocket ApplicationId = model.ApplicationId; Description = model.Description; Name = model.Name; - DefaultPermission = model.DefaultPermissions.GetValueOrDefault(true); + IsDefaultPermission = model.DefaultPermissions.GetValueOrDefault(true); Type = model.Type; Options = model.Options.IsSpecified diff --git a/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommandOption.cs b/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommandOption.cs index 836088638..e4332b02a 100644 --- a/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommandOption.cs +++ b/src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommandOption.cs @@ -23,10 +23,10 @@ namespace Discord.WebSocket public string Description { get; private set; } /// - public bool? Default { get; private set; } + public bool? IsDefault { get; private set; } /// - public bool? Required { get; private set; } + public bool? IsRequired { get; private set; } /// /// Choices for string and int types for the user to pick from. @@ -57,11 +57,11 @@ namespace Discord.WebSocket Type = model.Type; Description = model.Description; - Default = model.Default.IsSpecified + IsDefault = model.Default.IsSpecified ? model.Default.Value : null; - Required = model.Required.IsSpecified + IsRequired = model.Required.IsSpecified ? model.Required.Value : null;