@@ -48,6 +48,13 @@ namespace Discord | |||||
/// </returns> | /// </returns> | ||||
ulong GuildId { get; } | ulong GuildId { get; } | ||||
/// <summary> | /// <summary> | ||||
/// Gets the date and time for when this user's guild boost began. | |||||
/// </summary> | |||||
/// <returns> | |||||
/// A <see cref="DateTime"/> for when the user began boosting this guild; <c>null</c> if they are not boosting the guild. | |||||
/// </returns> | |||||
DateTime? PremiumSince { get; } | |||||
/// <summary> | |||||
/// Gets a collection of IDs for the roles that this user currently possesses in the guild. | /// Gets a collection of IDs for the roles that this user currently possesses in the guild. | ||||
/// </summary> | /// </summary> | ||||
/// <remarks> | /// <remarks> | ||||
@@ -24,7 +24,8 @@ namespace Discord.Rest | |||||
public bool IsDeafened { get; private set; } | public bool IsDeafened { get; private set; } | ||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
public bool IsMuted { get; private set; } | public bool IsMuted { get; private set; } | ||||
/// <inheritdoc /> | |||||
public DateTime? PremiumSince { get; private set; } | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
public ulong GuildId => Guild.Id; | public ulong GuildId => Guild.Id; | ||||
@@ -69,6 +70,8 @@ namespace Discord.Rest | |||||
IsMuted = model.Mute.Value; | IsMuted = model.Mute.Value; | ||||
if (model.Roles.IsSpecified) | if (model.Roles.IsSpecified) | ||||
UpdateRoles(model.Roles.Value); | UpdateRoles(model.Roles.Value); | ||||
if (model.PremiumSince.IsSpecified) | |||||
PremiumSince = model.PremiumSince.Value; | |||||
} | } | ||||
private void UpdateRoles(ulong[] roleIds) | private void UpdateRoles(ulong[] roleIds) | ||||
{ | { | ||||
@@ -13,6 +13,8 @@ namespace Discord.Rest | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
public ulong WebhookId { get; } | public ulong WebhookId { get; } | ||||
internal IGuild Guild { get; } | internal IGuild Guild { get; } | ||||
/// <inheritdoc /> | |||||
public DateTime? PremiumSince { get; private set; } | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
public override bool IsWebhook => true; | public override bool IsWebhook => true; | ||||
@@ -76,6 +76,9 @@ namespace Discord.WebSocket | |||||
public SocketVoiceState? VoiceState => Guild.GetVoiceState(Id); | public SocketVoiceState? VoiceState => Guild.GetVoiceState(Id); | ||||
public AudioInStream AudioStream => Guild.GetAudioStream(Id); | public AudioInStream AudioStream => Guild.GetAudioStream(Id); | ||||
/// <inheritdoc /> | |||||
public DateTime? PremiumSince { get; private set; } | |||||
/// <summary> | /// <summary> | ||||
/// Returns the position of the user within the role hierarchy. | /// Returns the position of the user within the role hierarchy. | ||||
/// </summary> | /// </summary> | ||||
@@ -63,6 +63,8 @@ namespace Discord.WebSocket | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
string IGuildUser.Nickname => null; | string IGuildUser.Nickname => null; | ||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
DateTime? IGuildUser.PremiumSince => null; | |||||
/// <inheritdoc /> | |||||
GuildPermissions IGuildUser.GuildPermissions => GuildPermissions.Webhook; | GuildPermissions IGuildUser.GuildPermissions => GuildPermissions.Webhook; | ||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||