Browse Source

Fix SocketSlashCommandDataOption to use long for Number instead of int (#89)

pull/1923/head
František Boháček GitHub 3 years ago
parent
commit
7c3feadd5f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketSlashCommandDataOption.cs

+ 3
- 3
src/Discord.Net.WebSocket/Entities/Interaction/Slash Commands/SocketSlashCommandDataOption.cs View File

@@ -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


Loading…
Cancel
Save