| @@ -2,6 +2,9 @@ using System; | |||||
| namespace Discord | namespace Discord | ||||
| { | { | ||||
| /// <summary> | |||||
| /// Represents a Discord thread user. | |||||
| /// </summary> | |||||
| public interface IThreadUser : IMentionable | public interface IThreadUser : IMentionable | ||||
| { | { | ||||
| /// <summary> | /// <summary> | ||||
| @@ -14,7 +17,9 @@ namespace Discord | |||||
| /// </summary> | /// </summary> | ||||
| DateTimeOffset ThreadJoinedAt { get; } | DateTimeOffset ThreadJoinedAt { get; } | ||||
| /// <inheritdoc /> | |||||
| string Mention { get; } | |||||
| /// <summary> | |||||
| /// Gets the guild this thread was created in. | |||||
| /// </summary> | |||||
| IGuild Guild { get; } | |||||
| } | } | ||||
| } | } | ||||
| @@ -9,18 +9,16 @@ namespace Discord.Rest | |||||
| /// </summary> | /// </summary> | ||||
| public class RestThreadUser : RestEntity<ulong>, IThreadUser | public class RestThreadUser : RestEntity<ulong>, IThreadUser | ||||
| { | { | ||||
| /// <inheritdoc /> | |||||
| /// <inheritdoc/> | |||||
| public IThreadChannel Thread { get; } | public IThreadChannel Thread { get; } | ||||
| /// <inheritdoc /> | |||||
| /// <inheritdoc/> | |||||
| public DateTimeOffset ThreadJoinedAt { get; private set; } | public DateTimeOffset ThreadJoinedAt { get; private set; } | ||||
| /// <summary> | |||||
| /// Gets the guild this user is in. | |||||
| /// </summary> | |||||
| /// <inheritdoc/> | |||||
| public IGuild Guild { get; } | public IGuild Guild { get; } | ||||
| /// <inheritdoc /> | |||||
| /// <inheritdoc/> | |||||
| public string Mention => MentionUtils.MentionUser(Id); | public string Mention => MentionUtils.MentionUser(Id); | ||||
| internal RestThreadUser(BaseDiscordClient discord, IGuild guild, IThreadChannel channel, ulong id) | internal RestThreadUser(BaseDiscordClient discord, IGuild guild, IThreadChannel channel, ulong id) | ||||
| @@ -179,11 +179,11 @@ namespace Discord.WebSocket | |||||
| /// <inheritdoc/> | /// <inheritdoc/> | ||||
| public Task RemoveTimeOutAsync(RequestOptions options = null) => GuildUser.RemoveTimeOutAsync(options); | public Task RemoveTimeOutAsync(RequestOptions options = null) => GuildUser.RemoveTimeOutAsync(options); | ||||
| /// <inheritdoc /> | |||||
| /// <inheritdoc/> | |||||
| IThreadChannel IThreadUser.Thread => Thread; | IThreadChannel IThreadUser.Thread => Thread; | ||||
| /// <inheritdoc/> | /// <inheritdoc/> | ||||
| GuildPermissions IGuildUser.GuildPermissions => GuildUser.GuildPermissions; | |||||
| IGuild IThreadUser.Guild => Guild; | |||||
| /// <inheritdoc/> | /// <inheritdoc/> | ||||
| IGuild IGuildUser.Guild => Guild; | IGuild IGuildUser.Guild => Guild; | ||||
| @@ -191,6 +191,9 @@ namespace Discord.WebSocket | |||||
| /// <inheritdoc/> | /// <inheritdoc/> | ||||
| ulong IGuildUser.GuildId => Guild.Id; | ulong IGuildUser.GuildId => Guild.Id; | ||||
| /// <inheritdoc/> | |||||
| GuildPermissions IGuildUser.GuildPermissions => GuildUser.GuildPermissions; | |||||
| /// <inheritdoc/> | /// <inheritdoc/> | ||||
| IReadOnlyCollection<ulong> IGuildUser.RoleIds => GuildUser.Roles.Select(x => x.Id).ToImmutableArray(); | IReadOnlyCollection<ulong> IGuildUser.RoleIds => GuildUser.Roles.Select(x => x.Id).ToImmutableArray(); | ||||