[Fix] Incorrect json model for Guild Scheduled Event (#2813)
* fix some cringe * whoooooooops
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
@@ -16,7 +13,7 @@ namespace Discord.API
|
||||
[JsonProperty("channel_id")]
|
||||
public Optional<ulong?> ChannelId { get; set; }
|
||||
[JsonProperty("creator_id")]
|
||||
public Optional<ulong> CreatorId { get; set; }
|
||||
public Optional<ulong?> CreatorId { get; set; }
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("description")]
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Discord.Rest
|
||||
Creator = RestUser.Create(Discord, model.Creator.Value);
|
||||
}
|
||||
|
||||
CreatorId = model.CreatorId.ToNullable() ?? 0; // should be changed?
|
||||
CreatorId = model.CreatorId.GetValueOrDefault(null) ?? 0; // should be changed?
|
||||
ChannelId = model.ChannelId.IsSpecified ? model.ChannelId.Value : null;
|
||||
Name = model.Name;
|
||||
Description = model.Description.GetValueOrDefault();
|
||||
|
||||
Reference in New Issue
Block a user