Search Results for

    Show / Hide Table of Contents

    Class BaseDiscordClient

    Inheritance
    Object
    BaseDiscordClient
    DiscordRestClient
    BaseSocketClient
    Implements
    IDiscordClient
    IDisposable
    IAsyncDisposable
    Namespace: Discord.Rest
    Assembly: Discord.Net.Rest.dll
    Syntax
    public abstract class BaseDiscordClient : object, IDiscordClient, IDisposable, IAsyncDisposable

    Properties

    | Improve this Doc View Source

    CurrentUser

    Gets the logged-in user.

    Declaration
    public ISelfUser CurrentUser { get; protected set; }
    Property Value
    Type Description
    ISelfUser
    | Improve this Doc View Source

    LoginState

    Gets the login state of the client.

    Declaration
    public LoginState LoginState { get; }
    Property Value
    Type Description
    LoginState
    | Improve this Doc View Source

    TokenType

    Gets the token type of the logged-in user.

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

    Methods

    | Improve this Doc View Source

    Dispose()

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    DisposeAsync()

    Declaration
    public ValueTask DisposeAsync()
    Returns
    Type Description
    ValueTask
    | Improve this Doc View Source

    GetBotGatewayAsync(RequestOptions)

    Declaration
    public Task<BotGateway> GetBotGatewayAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options
    Returns
    Type Description
    Task<BotGateway>
    | Improve this Doc View Source

    GetRecommendedShardCountAsync(RequestOptions)

    Declaration
    public Task<int> GetRecommendedShardCountAsync(RequestOptions options = null)
    Parameters
    Type Name Description
    RequestOptions options
    Returns
    Type Description
    Task<Int32>
    | Improve this Doc View Source

    LoginAsync(TokenType, String, Boolean)

    Declaration
    public async Task LoginAsync(TokenType tokenType, string token, bool validateToken = true)
    Parameters
    Type Name Description
    TokenType tokenType
    String token
    Boolean validateToken
    Returns
    Type Description
    Task
    | Improve this Doc View Source

    LogoutAsync()

    Declaration
    public async Task LogoutAsync()
    Returns
    Type Description
    Task

    Events

    | Improve this Doc View Source

    Log

    Declaration
    public event Func<LogMessage, Task> Log
    Event Type
    Type Description
    Func<LogMessage, Task>
    | Improve this Doc View Source

    LoggedIn

    Declaration
    public event Func<Task> LoggedIn
    Event Type
    Type Description
    Func<Task>
    | Improve this Doc View Source

    LoggedOut

    Declaration
    public event Func<Task> LoggedOut
    Event Type
    Type Description
    Func<Task>

    Explicit Interface Implementations

    | Improve this Doc View Source

    IDiscordClient.ConnectionState

    Gets the current state of connection.

    Declaration
    ConnectionState IDiscordClient.ConnectionState { get; }
    Returns
    Type Description
    ConnectionState
    | Improve this Doc View Source

    IDiscordClient.CurrentUser

    Gets the currently logged-in user.

    Declaration
    ISelfUser IDiscordClient.CurrentUser { get; }
    Returns
    Type Description
    ISelfUser

    Implements

    IDiscordClient
    IDisposable
    IAsyncDisposable

    Extension Methods

    ClientExtensions.AddGuildUserAsync(BaseDiscordClient, UInt64, UInt64, String, Action<AddGuildUserProperties>, RequestOptions)

    Theme

    • Improve this Doc
    • View Source
    In This Article
    Back to top Discord.Net (c) 2015-2022 3.6.0