Properly implement UserUpdated for Username or Avatar Changes

This commit is contained in:
Christopher F
2016-10-22 15:15:19 -04:00
parent 1e55d30a65
commit c80f73764c
2 changed files with 28 additions and 12 deletions

View File

@@ -92,6 +92,10 @@ namespace Discord.WebSocket
UpdateRoles(model.Roles.Value);
if (model.Nick.IsSpecified)
Nickname = model.Nick.Value;
if (model.User.Username.IsSpecified)
GlobalUser.Username = model.User.Username.Value;
if (model.User.Avatar.IsSpecified)
GlobalUser.AvatarId = model.User.Avatar.Value;
}
private void UpdateRoles(ulong[] roleIds)
{