fix: Discord sends null when there's no team

This commit is contained in:
Paulo
2020-11-09 12:31:17 -03:00
committed by GitHub
parent 9134443494
commit 05a1f0a709

View File

@@ -59,7 +59,7 @@ 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)
if (model.Team.IsSpecified && model.Team.Value != null)
Team = RestTeam.Create(Discord, model.Team.Value);
}