Add missing IThreadUser interface (#2055)
* Implement * Add IMentionable to RestThreadUser * Rather move mentionable to interface for consistency. * Further consistency
This commit is contained in:
@@ -7,23 +7,20 @@ namespace Discord.Rest
|
||||
/// <summary>
|
||||
/// Represents a thread user received over the REST api.
|
||||
/// </summary>
|
||||
public class RestThreadUser : RestEntity<ulong>
|
||||
public class RestThreadUser : RestEntity<ulong>, IThreadUser
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the <see cref="RestThreadChannel"/> this user is in.
|
||||
/// </summary>
|
||||
/// <inheritdoc/>
|
||||
public IThreadChannel Thread { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the timestamp for when this user joined this thread.
|
||||
/// </summary>
|
||||
public DateTimeOffset JoinedAt { get; private set; }
|
||||
/// <inheritdoc/>
|
||||
public DateTimeOffset ThreadJoinedAt { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the guild this user is in.
|
||||
/// </summary>
|
||||
/// <inheritdoc/>
|
||||
public IGuild Guild { get; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public string Mention => MentionUtils.MentionUser(Id);
|
||||
|
||||
internal RestThreadUser(BaseDiscordClient discord, IGuild guild, IThreadChannel channel, ulong id)
|
||||
: base(discord, id)
|
||||
{
|
||||
@@ -40,7 +37,7 @@ namespace Discord.Rest
|
||||
|
||||
internal void Update(Model model)
|
||||
{
|
||||
JoinedAt = model.JoinTimestamp;
|
||||
ThreadJoinedAt = model.JoinTimestamp;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user