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