fix: Add empty role list if not present (#1871)
This commit is contained in:
@@ -125,12 +125,16 @@ namespace Discord.WebSocket
|
||||
{
|
||||
var entity = new SocketGuildUser(guild, guild.Discord.GetOrCreateUser(state, model.User));
|
||||
entity.Update(state, model);
|
||||
if (!model.Roles.IsSpecified)
|
||||
entity.UpdateRoles(new ulong[0]);
|
||||
return entity;
|
||||
}
|
||||
internal static SocketGuildUser Create(SocketGuild guild, ClientState state, PresenceModel model)
|
||||
{
|
||||
var entity = new SocketGuildUser(guild, guild.Discord.GetOrCreateUser(state, model.User));
|
||||
entity.Update(state, model, false);
|
||||
if (!model.Roles.IsSpecified)
|
||||
entity.UpdateRoles(new ulong[0]);
|
||||
return entity;
|
||||
}
|
||||
internal void Update(ClientState state, MemberModel model)
|
||||
|
||||
Reference in New Issue
Block a user