fix: Team is nullable, not optional (#1672)
This commit is contained in:
@@ -20,7 +20,7 @@ namespace Discord.API
|
||||
[JsonProperty("bot_require_code_grant")]
|
||||
public bool BotRequiresCodeGrant { get; set; }
|
||||
[JsonProperty("team")]
|
||||
public Optional<Team> Team { get; set; }
|
||||
public Team Team { get; set; }
|
||||
|
||||
[JsonProperty("flags"), Int53]
|
||||
public Optional<ulong> Flags { get; set; }
|
||||
|
||||
@@ -59,8 +59,8 @@ namespace Discord.Rest
|
||||
Flags = model.Flags.Value; //TODO: Do we still need this?
|
||||
if (model.Owner.IsSpecified)
|
||||
Owner = RestUser.Create(Discord, model.Owner.Value);
|
||||
if (model.Team.IsSpecified && model.Team.Value != null)
|
||||
Team = RestTeam.Create(Discord, model.Team.Value);
|
||||
if (model.Team != null)
|
||||
Team = RestTeam.Create(Discord, model.Team);
|
||||
}
|
||||
|
||||
/// <exception cref="InvalidOperationException">Unable to update this object from a different application token.</exception>
|
||||
|
||||
Reference in New Issue
Block a user