Class RestSelfUser
Represents the logged-in REST-based user.
public class RestSelfUser : RestUser, IUpdateable, ISelfUser, IUser, ISnowflakeEntity, IEntity<ulong>, IMentionable, IPresence
- Inheritance
-
RestSelfUser
- Implements
- Inherited Members
- Extension Methods
Properties
Gets the email associated with this user.
public string Email { get; }
Property Value
Flags
Gets the flags that are applied to a user's account.
public UserProperties Flags { get; }
Property Value
- UserProperties
The value of flags for this user.
Remarks
This value is determined by bitwise OR-ing UserProperties values together.
IsMfaEnabled
Indicates whether or not this user has MFA enabled on their account.
public bool IsMfaEnabled { get; }
Property Value
IsVerified
Indicates whether or not this user has their email verified.
public bool IsVerified { get; }
Property Value
Locale
Gets the user's chosen language option.
public string Locale { get; }
Property Value
- 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.
PremiumType
Gets the type of Nitro subscription that is active on this user's account.
public PremiumType PremiumType { get; }
Property Value
- 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
ModifyAsync(Action<SelfUserProperties>, RequestOptions)
Modifies the user's properties.
public Task ModifyAsync(Action<SelfUserProperties> func, RequestOptions options = null)
Parameters
func
Action<SelfUserProperties>options
RequestOptions
Returns
Exceptions
- InvalidOperationException
Unable to modify this object using a different token.
UpdateAsync(RequestOptions)
Updates this object's properties with its current state.
public override Task UpdateAsync(RequestOptions options = null)
Parameters
options
RequestOptionsThe options to be used when sending the request.
Returns
Exceptions
- InvalidOperationException
Unable to update this object using a different token.