Class RestUser
Represents a REST-based user.
Inheritance
System.Object
RestUser
Inherited Members
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()
Assembly: Discord.Net.Rest.dll
Syntax
public class RestUser : RestEntity<ulong>, IUser, ISnowflakeEntity, IEntity<ulong>, IMentionable, IPresence, IUpdateable
Properties
|
Improve this Doc
View Source
ActiveClients
Declaration
public virtual IImmutableSet<ClientType> ActiveClients { get; }
Property Value
| Type |
Description |
| System.Collections.Immutable.IImmutableSet<ClientType> |
|
|
Improve this Doc
View Source
Activity
Declaration
public virtual IActivity Activity { get; }
Property Value
|
Improve this Doc
View Source
AvatarId
Declaration
public string AvatarId { get; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
CreatedAt
Declaration
public DateTimeOffset CreatedAt { get; }
Property Value
| Type |
Description |
| System.DateTimeOffset |
|
|
Improve this Doc
View Source
Discriminator
Declaration
public string Discriminator { get; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
DiscriminatorValue
Declaration
public ushort DiscriminatorValue { get; }
Property Value
| Type |
Description |
| System.UInt16 |
|
|
Improve this Doc
View Source
IsBot
Declaration
public bool IsBot { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsWebhook
Declaration
public virtual bool IsWebhook { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Mention
Declaration
public string Mention { get; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
Status
Declaration
public virtual UserStatus Status { get; }
Property Value
|
Improve this Doc
View Source
Username
Declaration
public string Username { get; }
Property Value
| Type |
Description |
| System.String |
|
Methods
|
Improve this Doc
View Source
Declaration
public string GetAvatarUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128)
Parameters
| Type |
Name |
Description |
| ImageFormat |
format |
|
| System.UInt16 |
size |
|
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
GetDefaultAvatarUrl()
Declaration
public string GetDefaultAvatarUrl()
Returns
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
GetOrCreateDMChannelAsync(RequestOptions)
Returns a direct message channel to this user, or create one if it does not already exist.
Declaration
public Task<RestDMChannel> GetOrCreateDMChannelAsync(RequestOptions options = null)
Parameters
| Type |
Name |
Description |
| RequestOptions |
options |
The options to be used when sending the request.
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task<RestDMChannel> |
A task that represents the asynchronous get operation. The task result contains a rest DM channel where the user is the recipient.
|
|
Improve this Doc
View Source
ToString()
Gets the Username#Discriminator of the user.
Declaration
public override string ToString()
Returns
| Type |
Description |
| System.String |
A string that resolves to Username#Discriminator of the user.
|
Overrides
System.Object.ToString()
|
Improve this Doc
View Source
UpdateAsync(RequestOptions)
Declaration
public virtual Task UpdateAsync(RequestOptions options = null)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
Explicit Interface Implementations
|
Improve this Doc
View Source
IUser.GetOrCreateDMChannelAsync(RequestOptions)
Declaration
Task<IDMChannel> IUser.GetOrCreateDMChannelAsync(RequestOptions options)
Parameters
Returns
| Type |
Description |
| System.Threading.Tasks.Task<IDMChannel> |
|
Implements