Show / Hide Table of Contents

Class SocketSelfUser

Represents the logged-in WebSocket-based user.

Inheritance
System.Object
SocketEntity<System.UInt64>
SocketUser
SocketSelfUser
Implements
ISelfUser
IUser
ISnowflakeEntity
IEntity<System.UInt64>
IMentionable
IPresence
Inherited Members
SocketUser.CreatedAt
SocketUser.Discriminator
SocketUser.Mention
SocketUser.Activity
SocketUser.Status
SocketUser.ActiveClients
SocketUser.MutualGuilds
SocketUser.GetOrCreateDMChannelAsync(RequestOptions)
SocketUser.GetAvatarUrl(ImageFormat, UInt16)
SocketUser.GetDefaultAvatarUrl()
SocketUser.ToString()
SocketEntity<UInt64>.Id
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Discord.WebSocket
Assembly: Discord.Net.WebSocket.dll
Syntax
public class SocketSelfUser : SocketUser, ISelfUser, IUser, ISnowflakeEntity, IEntity<ulong>, IMentionable, IPresence

Properties

| Improve this Doc View Source

AvatarId

Gets the identifier of this user's avatar.

Declaration
public override string AvatarId { get; }
Property Value
Type Description
System.String
Overrides
SocketUser.AvatarId
| Improve this Doc View Source

DiscriminatorValue

Gets the per-username unique ID for this user.

Declaration
public override ushort DiscriminatorValue { get; }
Property Value
Type Description
System.UInt16
Overrides
SocketUser.DiscriminatorValue
| Improve this Doc View Source

Email

Gets the email associated with this user.

Declaration
public string Email { get; }
Property Value
Type Description
System.String
| Improve this Doc View Source

Flags

Gets the flags that are applied to a user's account.

Declaration
public UserProperties Flags { get; }
Property Value
Type Description
UserProperties

The value of flags for this user.

Remarks

This value is determined by bitwise OR-ing UserProperties values together.

| Improve this Doc View Source

IsBot

Gets a value that indicates whether this user is identified as a bot.

Declaration
public override bool IsBot { get; }
Property Value
Type Description
System.Boolean

true if the user is a bot application; otherwise false.

Overrides
SocketUser.IsBot
Remarks

This property retrieves a value that indicates whether this user is a registered bot application (indicated by the blue BOT tag within the official chat client).

| Improve this Doc View Source

IsMfaEnabled

Indicates whether or not this user has MFA enabled on their account.

Declaration
public bool IsMfaEnabled { get; }
Property Value
Type Description
System.Boolean

true if this user has enabled multi-factor authentication on their account; false if not.

| Improve this Doc View Source

IsVerified

Indicates whether or not this user has their email verified.

Declaration
public bool IsVerified { get; }
Property Value
Type Description
System.Boolean

true if this user's email has been verified; false if not.

| Improve this Doc View Source

IsWebhook

Gets a value that indicates whether this user is a webhook user.

Declaration
public override bool IsWebhook { get; }
Property Value
Type Description
System.Boolean

true if the user is a webhook; otherwise false.

Overrides
SocketUser.IsWebhook
| Improve this Doc View Source

Locale

Gets the user's chosen language option.

Declaration
public string Locale { get; }
Property Value
Type Description
System.String

The IETF language tag of the user's chosen region, if provided. For example, a locale of "English, US" is "en-US", "Chinese (Taiwan)" is "zh-TW", etc.

| Improve this Doc View Source

PremiumType

Gets the type of Nitro subscription that is active on this user's account.

Declaration
public PremiumType PremiumType { get; }
Property Value
Type Description
PremiumType

The type of Nitro subscription the user subscribes to, if any.

Remarks

This information may only be available with the identify OAuth scope.

| Improve this Doc View Source

Username

Gets the username for this user.

Declaration
public override string Username { get; }
Property Value
Type Description
System.String
Overrides
SocketUser.Username

Methods

| Improve this Doc View Source

ModifyAsync(Action<SelfUserProperties>, RequestOptions)

Modifies the user's properties.

Declaration
public Task ModifyAsync(Action<SelfUserProperties> func, RequestOptions options = null)
Parameters
Type Name Description
System.Action<SelfUserProperties> func
RequestOptions options
Returns
Type Description
System.Threading.Tasks.Task

Implements

ISelfUser
IUser
ISnowflakeEntity
IEntity<TId>
IMentionable
IPresence
  • Improve this Doc
  • View Source
Back to top Generated by DocFX