Fixed Guild.Features nullref

This commit is contained in:
RogueException
2016-06-07 21:28:55 -03:00
parent d55e0309a0
commit 2b8e32785d

View File

@@ -54,14 +54,13 @@ namespace Discord
EmbedChannelId = model.EmbedChannelId;
AFKTimeout = model.AFKTimeout;
IsEmbeddable = model.EmbedEnabled;
Features = model.Features.ToImmutableArray();
_iconId = model.Icon;
Name = model.Name;
OwnerId = model.OwnerId;
VoiceRegionId = model.Region;
_splashId = model.Splash;
VerificationLevel = model.VerificationLevel;
if (model.Emojis != null)
{
var emojis = ImmutableArray.CreateBuilder<Emoji>(model.Emojis.Length);
@@ -72,6 +71,11 @@ namespace Discord
else
Emojis = ImmutableArray.Create<Emoji>();
if (model.Features != null)
Features = model.Features.ToImmutableArray();
else
Features = ImmutableArray.Create<string>();
var roles = new ConcurrentDictionary<ulong, Role>(1, model.Roles?.Length ?? 0);
if (model.Roles != null)
{