Show / Hide Table of Contents

# Class RestSelfUser

Represents the logged-in REST-based user.

##### Inheritance

System.Object
RestEntity<System.UInt64>
RestUser
RestSelfUser

##### Implements

IUpdateable
ISelfUser
IUser
ISnowflakeEntity
IEntity<System.UInt64>
IMentionable
IPresence

##### Inherited Members

RestUser.IsBot
RestUser.Username
RestUser.DiscriminatorValue
RestUser.AvatarId
RestUser.CreatedAt
RestUser.Discriminator
RestUser.Mention
RestUser.Activity
RestUser.Status
RestUser.ActiveClients
RestUser.IsWebhook
RestUser.GetOrCreateDMChannelAsync(RequestOptions)
RestUser.GetAvatarUrl(ImageFormat, UInt16)
RestUser.GetDefaultAvatarUrl()
RestUser.ToString()
RestUser.IUser.GetOrCreateDMChannelAsync(RequestOptions)
RestEntity<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.Rest

###### Assembly: Discord.Net.Rest.dll

##### Syntax

    public class RestSelfUser : RestUser, IUpdateable, ISelfUser, IUser, ISnowflakeEntity, IEntity<ulong>, IMentionable, IPresence

### Properties

| 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

#### 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

#### 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.

### 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 |

##### Exceptions

Type | Condition
--- | ---
System.InvalidOperationException | Unable to modify this object using a different token.

| Improve this Doc View Source

#### UpdateAsync(RequestOptions)

Updates this object's properties with its current state.

##### Declaration

    public override Task UpdateAsync(RequestOptions options = null)

##### Parameters

Type | Name | Description
--- | --- | ---
RequestOptions | options |

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task |

##### Overrides

RestUser.UpdateAsync(RequestOptions)

##### Exceptions

Type | Condition
--- | ---
System.InvalidOperationException | Unable to update this object using a different token.

### Implements

IUpdateable
ISelfUser
IUser
ISnowflakeEntity
IEntity<TId>
IMentionable
IPresence