diff --git a/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandOptionType.cs b/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandOptionType.cs index 18e383cef..a1b366e18 100644 --- a/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandOptionType.cs +++ b/src/Discord.Net.Core/Entities/Interactions/ApplicationCommandOptionType.cs @@ -54,6 +54,11 @@ namespace Discord /// /// A or . /// - Mentionable = 9 + Mentionable = 9, + + /// + /// A . + /// + Number = 10 } } diff --git a/src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketSlashCommandDataOption.cs b/src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketSlashCommandDataOption.cs index d62f1bf58..f33008cf3 100644 --- a/src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketSlashCommandDataOption.cs +++ b/src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketSlashCommandDataOption.cs @@ -96,7 +96,15 @@ namespace Discord.WebSocket { if (model.Value.Value is bool val) this.Value = val; - else if (bool.TryParse(model.Value.Value.ToString(), out var res)) + else if (bool.TryParse(model.Value.Value.ToString(), out bool res)) + this.Value = res; + } + break; + case ApplicationCommandOptionType.Number: + { + if (model.Value.Value is int val) + this.Value = val; + else if (double.TryParse(model.Value.Value.ToString(), out double res)) this.Value = res; } break;