Class SocketThreadUser
Represents a thread user received over the gateway.
Assembly: Discord.Net.WebSocket.dll​
View Source​
public class SocketThreadUser : SocketUser, IGuildUser, IUser, ISnowflakeEntity, IEntity<ulong>, IMentionable, IPresence, IVoiceState
Properties​
Thread​
Gets the Discord.WebSocket.SocketThreadChannel this user is in.
View Source​
public SocketThreadChannel Thread { get; }
ThreadJoinedAt​
Gets the timestamp for when this user joined this thread.
View Source​
public DateTimeOffset ThreadJoinedAt { get; }
Guild​
Gets the guild this user is in.
View Source​
public SocketGuild Guild { get; }
JoinedAt​
Gets when this user joined the guild.
View Source​
public DateTimeOffset? JoinedAt { get; }
Nickname​
Gets the nickname for this user.
View Source​
public string Nickname { get; }
PremiumSince​
Gets the date and time for when this user's guild boost began.
View Source​
public DateTimeOffset? PremiumSince { get; }
IsPending​
Whether the user has passed the guild's Membership Screening requirements.
View Source​
public bool? IsPending { get; }
Hierarchy​
Gets the users position within the role hierarchy.
View Source​
public int Hierarchy { get; }
AvatarId​
Gets the identifier of this user's avatar.
View Source​
public override string AvatarId { get; }
GuildAvatarId​
Gets the guild specific avatar for this users.
View Source​
public string GuildAvatarId { get; }
DiscriminatorValue​
Gets the per-username unique ID for this user.
View Source​
public override ushort DiscriminatorValue { get; }
IsBot​
Gets a value that indicates whether this user is identified as a bot.
View Source​
public override bool IsBot { get; }
IsWebhook​
Gets a value that indicates whether this user is a webhook user.
View Source​
public override bool IsWebhook { get; }
Username​
Gets the username for this user.
View Source​
public override string Username { get; }
IsDeafened​
Gets a value that indicates whether this user is deafened by the guild.
View Source​
public bool IsDeafened { get; }
IsMuted​
Gets a value that indicates whether this user is muted (i.e. not permitted to speak via voice) by the guild.
View Source​
public bool IsMuted { get; }
IsSelfDeafened​
Gets a value that indicates whether this user has marked themselves as deafened.
View Source​
public bool IsSelfDeafened { get; }
IsSelfMuted​
Gets a value that indicates whether this user has marked themselves as muted (i.e. not permitted to speak via voice).
View Source​
public bool IsSelfMuted { get; }
IsSuppressed​
Gets a value that indicates whether the user is muted by the current user.
View Source​
public bool IsSuppressed { get; }
VoiceChannel​
Gets the voice channel this user is currently in.
View Source​
public IVoiceChannel VoiceChannel { get; }
VoiceSessionId​
Gets the unique identifier for this user's voice session.
View Source​
public string VoiceSessionId { get; }
IsStreaming​
Gets a value that indicates if this user is streaming in a voice channel.
View Source​
public bool IsStreaming { get; }
RequestToSpeakTimestamp​
Gets the time on which the user requested to speak.
View Source​
public DateTimeOffset? RequestToSpeakTimestamp { get; }
IGuildUser.GuildPermissions​
Gets the guild-level permissions for this user.
View Source​
GuildPermissions IGuildUser.GuildPermissions { get; }
IGuildUser.Guild​
Gets the guild for this user.
View Source​
IGuild IGuildUser.Guild { get; }
IGuildUser.GuildId​
Gets the ID of the guild for this user.
View Source​
ulong IGuildUser.GuildId { get; }
IGuildUser.RoleIds​
Gets a collection of IDs for the roles that this user currently possesses in the guild.
View Source​
IReadOnlyCollection<ulong> IGuildUser.RoleIds { get; }
Methods​
GetPermissions(IGuildChannel)​
Gets the level permissions granted to this user to a given channel.
View Source​
public ChannelPermissions GetPermissions(IGuildChannel channel)
Returns​
Discord.ChannelPermissions: A Discord.ChannelPermissions structure representing the permissions that a user has in the specified channel.
Parameters​
Type | Name | Description |
---|---|---|
Discord.IGuildChannel | channel | The channel to get the permission from. |
KickAsync(String, RequestOptions)​
Kicks this user from this guild.
View Source​
public Task KickAsync(string reason = null, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous kick operation.
Parameters​
Type | Name | Description |
---|---|---|
System.String | reason | The reason for the kick which will be recorded in the audit log. |
Discord.RequestOptions | options | The options to be used when sending the request. |
ModifyAsync(Action<GuildUserProperties>, RequestOptions)​
Modifies this user's properties in this guild.
View Source​
public Task ModifyAsync(Action<GuildUserProperties> func, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous modification operation.
Parameters​
Type | Name | Description |
---|---|---|
System.Action<Discord.GuildUserProperties> | func | The delegate containing the properties to modify the user with. |
Discord.RequestOptions | options | The options to be used when sending the request. |
AddRoleAsync(UInt64, RequestOptions)​
Adds the specified role to this user in the guild.
View Source​
public Task AddRoleAsync(ulong roleId, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous role addition operation.
Parameters​
Type | Name | Description |
---|---|---|
System.UInt64 | roleId | The role to be added to the user. |
Discord.RequestOptions | options | The options to be used when sending the request. |
AddRoleAsync(IRole, RequestOptions)​
Adds the specified role to this user in the guild.
View Source​
public Task AddRoleAsync(IRole role, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous role addition operation.
Parameters​
Type | Name | Description |
---|---|---|
Discord.IRole | role | The role to be added to the user. |
Discord.RequestOptions | options | The options to be used when sending the request. |
AddRolesAsync(IEnumerable<UInt64>, RequestOptions)​
Adds the specified <code data-dev-comment-type="paramref" class="paramref">roleIds</code> to this user in the guild.
View Source​
public Task AddRolesAsync(IEnumerable<ulong> roleIds, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous role addition operation.
Parameters​
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.UInt64> | roleIds | The roles to be added to the user. |
Discord.RequestOptions | options | The options to be used when sending the request. |
AddRolesAsync(IEnumerable<IRole>, RequestOptions)​
Adds the specified <code data-dev-comment-type="paramref" class="paramref">roles</code> to this user in the guild.
View Source​
public Task AddRolesAsync(IEnumerable<IRole> roles, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous role addition operation.
Parameters​
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<Discord.IRole> | roles | The roles to be added to the user. |
Discord.RequestOptions | options | The options to be used when sending the request. |
RemoveRoleAsync(UInt64, RequestOptions)​
Removes the specified <code data-dev-comment-type="paramref" class="paramref">roleId</code> from this user in the guild.
View Source​
public Task RemoveRoleAsync(ulong roleId, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous role removal operation.
Parameters​
Type | Name | Description |
---|---|---|
System.UInt64 | roleId | The role to be removed from the user. |
Discord.RequestOptions | options | The options to be used when sending the request. |
RemoveRoleAsync(IRole, RequestOptions)​
Removes the specified <code data-dev-comment-type="paramref" class="paramref">role</code> from this user in the guild.
View Source​
public Task RemoveRoleAsync(IRole role, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous role removal operation.
Parameters​
Type | Name | Description |
---|---|---|
Discord.IRole | role | The role to be removed from the user. |
Discord.RequestOptions | options | The options to be used when sending the request. |
RemoveRolesAsync(IEnumerable<UInt64>, RequestOptions)​
Removes the specified <code data-dev-comment-type="paramref" class="paramref">roleIds</code> from this user in the guild.
View Source​
public Task RemoveRolesAsync(IEnumerable<ulong> roleIds, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous role removal operation.
Parameters​
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.UInt64> | roleIds | The roles to be removed from the user. |
Discord.RequestOptions | options | The options to be used when sending the request. |
RemoveRolesAsync(IEnumerable<IRole>, RequestOptions)​
Removes the specified <code data-dev-comment-type="paramref" class="paramref">roles</code> from this user in the guild.
View Source​
public Task RemoveRolesAsync(IEnumerable<IRole> roles, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
:
A task that represents the asynchronous role removal operation.
Parameters​
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<Discord.IRole> | roles | The roles to be removed from the user. |
Discord.RequestOptions | options | The options to be used when sending the request. |
IGuildUser.GetGuildAvatarUrl(ImageFormat, UInt16)​
View Source​
string IGuildUser.GetGuildAvatarUrl(ImageFormat format, ushort size)
Returns​
System.String
Parameters​
Type | Name |
---|---|
Discord.ImageFormat | format |
System.UInt16 | size |