feature: Add user public flags (#1722)

This commit is contained in:
Paulo
2020-12-23 12:46:42 -03:00
committed by GitHub
parent 6a62c4770c
commit c683b2901d
5 changed files with 62 additions and 9 deletions

View File

@@ -26,6 +26,8 @@ namespace Discord.WebSocket
public abstract string AvatarId { get; internal set; }
/// <inheritdoc />
public abstract bool IsWebhook { get; }
/// <inheritdoc />
public UserProperties? PublicFlags { get; private set; }
internal abstract SocketGlobalUser GlobalUser { get; }
internal abstract SocketPresence Presence { get; set; }
@@ -83,6 +85,11 @@ namespace Discord.WebSocket
Username = model.Username.Value;
hasChanges = true;
}
if (model.PublicFlags.IsSpecified && model.PublicFlags.Value != PublicFlags)
{
PublicFlags = model.PublicFlags.Value;
hasChanges = true;
}
return hasChanges;
}