Class CurrentUser
- Namespace
- NetCord
- Assembly
- NetCord.dll
public class CurrentUser : User, IEntity, ISpanFormattable, IFormattable, IEquatable<Entity>, IJsonModel<JsonUser>
- Inheritance
-
CurrentUser
- Implements
-
- Inherited Members
-
Constructors
CurrentUser(JsonUser, RestClient)
public CurrentUser(JsonUser jsonModel, RestClient client)
Parameters
jsonModel
JsonUser
client
RestClient
Methods
GetApplicationRoleConnectionAsync(ulong, RestRequestProperties?, CancellationToken)
public Task<ApplicationRoleConnection> GetApplicationRoleConnectionAsync(ulong applicationId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
applicationId
ulong
properties
RestRequestProperties
cancellationToken
CancellationToken
Returns
- Task<ApplicationRoleConnection>
GetAsync(RestRequestProperties?, CancellationToken)
public Task<CurrentUser> GetAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
properties
RestRequestProperties
cancellationToken
CancellationToken
Returns
- Task<CurrentUser>
GetConnectionsAsync(RestRequestProperties?, CancellationToken)
public Task<IReadOnlyList<Connection>> GetConnectionsAsync(RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
properties
RestRequestProperties
cancellationToken
CancellationToken
Returns
- Task<IReadOnlyList<Connection>>
GetGuildUserAsync(ulong, RestRequestProperties?, CancellationToken)
public Task<GuildUser> GetGuildUserAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
guildId
ulong
properties
RestRequestProperties
cancellationToken
CancellationToken
Returns
- Task<GuildUser>
public IAsyncEnumerable<RestGuild> GetGuildsAsync(GuildsPaginationProperties? paginationProperties = null, RestRequestProperties? properties = null)
Parameters
paginationProperties
GuildsPaginationProperties
properties
RestRequestProperties
Returns
- IAsyncEnumerable<RestGuild>
LeaveGuildAsync(ulong, RestRequestProperties?, CancellationToken)
public Task LeaveGuildAsync(ulong guildId, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
guildId
ulong
properties
RestRequestProperties
cancellationToken
CancellationToken
Returns
- Task
ModifyAsync(Action<CurrentUserOptions>, RestRequestProperties?, CancellationToken)
public Task<CurrentUser> ModifyAsync(Action<CurrentUserOptions> action, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
action
Action<CurrentUserOptions>
properties
RestRequestProperties
cancellationToken
CancellationToken
Returns
- Task<CurrentUser>
UpdateApplicationRoleConnectionAsync(ulong, ApplicationRoleConnectionProperties, RestRequestProperties?, CancellationToken)
public Task<ApplicationRoleConnection> UpdateApplicationRoleConnectionAsync(ulong applicationId, ApplicationRoleConnectionProperties applicationRoleConnectionProperties, RestRequestProperties? properties = null, CancellationToken cancellationToken = default)
Parameters
applicationId
ulong
applicationRoleConnectionProperties
ApplicationRoleConnectionProperties
properties
RestRequestProperties
cancellationToken
CancellationToken
Returns
- Task<ApplicationRoleConnection>