Fixed Guild.Features nullref
This commit is contained in:
@@ -54,7 +54,6 @@ namespace Discord
|
|||||||
EmbedChannelId = model.EmbedChannelId;
|
EmbedChannelId = model.EmbedChannelId;
|
||||||
AFKTimeout = model.AFKTimeout;
|
AFKTimeout = model.AFKTimeout;
|
||||||
IsEmbeddable = model.EmbedEnabled;
|
IsEmbeddable = model.EmbedEnabled;
|
||||||
Features = model.Features.ToImmutableArray();
|
|
||||||
_iconId = model.Icon;
|
_iconId = model.Icon;
|
||||||
Name = model.Name;
|
Name = model.Name;
|
||||||
OwnerId = model.OwnerId;
|
OwnerId = model.OwnerId;
|
||||||
@@ -72,6 +71,11 @@ namespace Discord
|
|||||||
else
|
else
|
||||||
Emojis = ImmutableArray.Create<Emoji>();
|
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);
|
var roles = new ConcurrentDictionary<ulong, Role>(1, model.Roles?.Length ?? 0);
|
||||||
if (model.Roles != null)
|
if (model.Roles != null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user