Search Results for

    Show / Hide Table of Contents

    Class KuracordConfiguration

    Represents configuration for KuracordClient.

    Inheritance
    Object
    KuracordConfiguration
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: KSharpPlus
    Assembly: KSharpPlus.dll
    Syntax
    public sealed class KuracordConfiguration

    Constructors

    | Improve this Doc View Source

    KuracordConfiguration()

    Creates a new configuration with default values.

    Declaration
    public KuracordConfiguration()
    | Improve this Doc View Source

    KuracordConfiguration(KuracordConfiguration)

    Creates a clone of another kuracord configuration.

    Declaration
    public KuracordConfiguration(KuracordConfiguration other)
    Parameters
    Type Name Description
    KuracordConfiguration other

    Client configuration to clone.

    Properties

    | Improve this Doc View Source

    AutoReconnect

    Sets whether to automatically reconnect in case a connection is lost.

    Defaults to true.

    Declaration
    public bool AutoReconnect { set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    HttpTimeout

    Sets the timeout for HTTP requests.

    Set to InfiniteTimeSpan to disable timeouts.

    Defaults to 10 seconds.

    Declaration
    public TimeSpan HttpTimeout { set; }
    Property Value
    Type Description
    TimeSpan
    | Improve this Doc View Source

    LoggerFactory

    Sets the logger implementation to use.

    To create your own logger, implement the instance.

    Defaults to built-in implementation.

    Declaration
    public ILoggerFactory LoggerFactory { set; }
    Property Value
    Type Description
    ILoggerFactory
    | Improve this Doc View Source

    LogTimestampFormat

    Allows you to overwrite the time format used by the internal debug logger.

    Only applicable when LoggerFactory is set left at default value. Defaults to ISO 8601-like format.

    Declaration
    public string LogTimestampFormat { set; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    LogUnknownEvents

    Whether to log unknown events or not. Defaults to true.

    Declaration
    public bool LogUnknownEvents { set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    MessageCacheSize

    Sets the size of the global message cache.

    Setting this to 0 will disable message caching entirely. Defaults to 1024.

    Declaration
    public int MessageCacheSize { set; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    MinimumLogLevel

    Sets the minimum logging level for messages.

    Typically, the default value of Information is ok for most uses.

    Declaration
    public LogLevel MinimumLogLevel { set; }
    Property Value
    Type Description
    LogLevel
    | Improve this Doc View Source

    Proxy

    Sets the proxy to use for HTTP and WebSocket connections to Kuracord.

    Defaults to null.

    Declaration
    public IWebProxy Proxy { set; }
    Property Value
    Type Description
    IWebProxy
    | Improve this Doc View Source

    ReconnectIndefinitely

    Defines that the client should attempt to reconnect indefinitely.

    This is typically a very bad idea to set to true, as it will swallow all connection errors.

    Defaults to false.

    Declaration
    public bool ReconnectIndefinitely { set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    Token

    Sets the token used to identify the client.

    Declaration
    public string Token { set; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    TokenType

    Sets the type of the token used to identify the client.

    Defaults to Bot.

    Declaration
    public TokenType TokenType { set; }
    Property Value
    Type Description
    TokenType
    | Improve this Doc View Source

    UseRelativeRatelimit

    Sets whether to rely on Kuracord for NTP (Network Time Protocol) synchronization with the "X-Ratelimit-Reset-After" header.

    If the system clock is not synced, setting this to true will ensure ratelimits are synced with Kuracord and reduce the risk of hitting one.

    This should only be set to false if the system clock is synced with NTP.

    Defaults to true.

    Declaration
    public bool UseRelativeRatelimit { set; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc View Source

    WebSocketClientFactory

    Sets the factory method used to create instances of WebSocket clients.

    Use CreateNew(IWebProxy) and equivalents on other implementations to switch out client implementations.

    Defaults to CreateNew(IWebProxy).

    Declaration
    public WebSocketClientFactoryDelegate WebSocketClientFactory { set; }
    Property Value
    Type Description
    WebSocketClientFactoryDelegate
    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2023 KSharpPlus Contributors