From 7c3feadd5f6c4b3ba4d498b523c1bba9593c7044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Boh=C3=A1=C4=8Dek?= Date: Fri, 6 Aug 2021 17:56:43 +0200 Subject: [PATCH] Fix SocketSlashCommandDataOption to use long for Number instead of int (#89) --- .../Slash Commands/SocketSlashCommandDataOption.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 f33008cf3..f9c12257e 100644 --- a/src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketSlashCommandDataOption.cs +++ b/src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketSlashCommandDataOption.cs @@ -86,9 +86,9 @@ namespace Discord.WebSocket break; case ApplicationCommandOptionType.Integer: { - if (model.Value.Value is int val) + if (model.Value.Value is long val) this.Value = val; - else if (int.TryParse(model.Value.Value.ToString(), out int res)) + else if (long.TryParse(model.Value.Value.ToString(), out long res)) this.Value = res; } break; @@ -109,7 +109,7 @@ namespace Discord.WebSocket } break; } - + } this.Options = model.Options.IsSpecified