Search Results for

    Show / Hide Table of Contents

    Class DiscordConfig

    Defines various behaviors of Discord.Net.

    Inheritance
    Object
    DiscordConfig
    DiscordRestConfig
    Namespace: Discord
    Assembly: Discord.Net.Core.dll
    Syntax
    public class DiscordConfig : object

    Fields

    | Improve this Doc View Source

    APIUrl

    Returns the base Discord API URL.

    Declaration
    public static readonly string APIUrl
    Field Value
    Type Description
    String

    The Discord API URL using APIVersion.

    | Improve this Doc View Source

    APIVersion

    Returns the API version Discord.Net uses.

    Declaration
    public const int APIVersion = null
    Field Value
    Type Description
    Int32

    An representing the API version that Discord.Net uses to communicate with Discord.

    A list of available API version can be seen on the official Discord API documentation .

    | Improve this Doc View Source

    CDNUrl

    Returns the base Discord CDN URL.

    Declaration
    public const string CDNUrl = null
    Field Value
    Type Description
    String

    The base Discord Content Delivery Network (CDN) URL.

    | Improve this Doc View Source

    DefaultRequestTimeout

    Returns the default timeout for requests.

    Declaration
    public const int DefaultRequestTimeout = null
    Field Value
    Type Description
    Int32

    The amount of time it takes in milliseconds before a request is timed out.

    | Improve this Doc View Source

    InviteUrl

    Returns the base Discord invite URL.

    Declaration
    public const string InviteUrl = null
    Field Value
    Type Description
    String

    The base Discord invite URL.

    | Improve this Doc View Source

    MaxApplicationDescriptionLength

    Returns the max length of an application description.

    Declaration
    public const int MaxApplicationDescriptionLength = null
    Field Value
    Type Description
    Int32
    | Improve this Doc View Source

    MaxApplicationTagLength

    Returns the max length of an application tag.

    Declaration
    public const int MaxApplicationTagLength = null
    Field Value
    Type Description
    Int32
    | Improve this Doc View Source

    MaxAuditLogEntriesPerBatch

    Returns the max audit log entries allowed to be in a request.

    Declaration
    public const int MaxAuditLogEntriesPerBatch = null
    Field Value
    Type Description
    Int32

    The maximum number of audit log entries that can be gotten per-batch.

    | Improve this Doc View Source

    MaxBansPerBatch

    Returns the max bans allowed to be in a request.

    Declaration
    public const int MaxBansPerBatch = null
    Field Value
    Type Description
    Int32

    The maximum number of bans that can be gotten per-batch.

    | Improve this Doc View Source

    MaxEmbedsPerMessage

    Returns the max number of embeds that can be sent with a message.

    Declaration
    public const int MaxEmbedsPerMessage = null
    Field Value
    Type Description
    Int32
    | Improve this Doc View Source

    MaxGuildEventUsersPerBatch

    Returns the max users allowed to be in a request for guild event users.

    Declaration
    public const int MaxGuildEventUsersPerBatch = null
    Field Value
    Type Description
    Int32

    The maximum number of users that can be gotten per-batch.

    | Improve this Doc View Source

    MaxGuildsPerBatch

    Returns the max guilds allowed to be in a request.

    Declaration
    public const int MaxGuildsPerBatch = null
    Field Value
    Type Description
    Int32

    The maximum number of guilds that can be gotten per-batch.

    | Improve this Doc View Source

    MaxMessageSize

    Returns the max length for a Discord message.

    Declaration
    public const int MaxMessageSize = null
    Field Value
    Type Description
    Int32

    The maximum length of a message allowed by Discord.

    | Improve this Doc View Source

    MaxMessagesPerBatch

    Returns the max messages allowed to be in a request.

    Declaration
    public const int MaxMessagesPerBatch = null
    Field Value
    Type Description
    Int32

    The maximum number of messages that can be gotten per-batch.

    | Improve this Doc View Source

    MaxStickersPerMessage

    Returns the max number of stickers that can be sent with a message.

    Declaration
    public const int MaxStickersPerMessage = null
    Field Value
    Type Description
    Int32
    | Improve this Doc View Source

    MaxThreadMembersPerBatch

    Returns the max thread members allowed to be in a request.

    Declaration
    public const int MaxThreadMembersPerBatch = null
    Field Value
    Type Description
    Int32

    The maximum number of thread members that can be gotten per-batch.

    | Improve this Doc View Source

    MaxUserReactionsPerBatch

    Returns the max user reactions allowed to be in a request.

    Declaration
    public const int MaxUserReactionsPerBatch = null
    Field Value
    Type Description
    Int32

    The maximum number of user reactions that can be gotten per-batch.

    | Improve this Doc View Source

    MaxUsersPerBatch

    Returns the max users allowed to be in a request.

    Declaration
    public const int MaxUsersPerBatch = null
    Field Value
    Type Description
    Int32

    The maximum number of users that can be gotten per-batch.

    | Improve this Doc View Source

    VoiceAPIVersion

    Returns the Voice API version Discord.Net uses.

    Declaration
    public const int VoiceAPIVersion = null
    Field Value
    Type Description
    Int32

    An representing the API version that Discord.Net uses to communicate with Discord's voice server.

    Properties

    | Improve this Doc View Source

    DefaultRatelimitCallback

    Gets or sets the default callback for ratelimits.

    Declaration
    public Func<IRateLimitInfo, Task> DefaultRatelimitCallback { get; set; }
    Property Value
    Type Description
    Func<IRateLimitInfo, Task>
    Remarks

    This property is mutually exclusive with RatelimitCallback.

    | Improve this Doc View Source

    DefaultRetryMode

    Gets or sets how a request should act in the case of an error, by default.

    Declaration
    public RetryMode DefaultRetryMode { get; set; }
    Property Value
    Type Description
    RetryMode

    The currently set RetryMode.

    | Improve this Doc View Source

    FormatUsersInBidirectionalUnicode

    Gets or sets if the Rest/Socket user override formats the string in respect to bidirectional unicode.

    Declaration
    public bool FormatUsersInBidirectionalUnicode { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    By default, the returned value will be "?Discord?#1234", to work with bidirectional usernames.
    If set to false, this value will be "Discord#1234".

    | Improve this Doc View Source

    LogLevel

    Gets or sets the minimum log level severity that will be sent to the Log event.

    Declaration
    public LogSeverity LogLevel { get; set; }
    Property Value
    Type Description
    LogSeverity

    The currently set LogSeverity for logging level.

    | Improve this Doc View Source

    UseInteractionSnowflakeDate

    Gets or sets whether or not the internal expiration check uses the system date

    • snowflake date to check if an interaction can be responded to.
    Declaration
    public bool UseInteractionSnowflakeDate { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    If set to false then the CreatedAt property in an interaction will be set to when it was received instead of the snowflakes date.
    This will still require a stable clock on your system.

    | Improve this Doc View Source

    UserAgent

    Gets the user agent that Discord.Net uses in its clients.

    Declaration
    public static string UserAgent { get; }
    Property Value
    Type Description
    String

    The user agent used in each Discord.Net request.

    | Improve this Doc View Source

    UseSystemClock

    Gets or sets whether or not rate-limits should use the system clock.

    Declaration
    public bool UseSystemClock { get; set; }
    Property Value
    Type Description
    Boolean
    Remarks

    If set to false, we will use the X-RateLimit-Reset-After header to determine when a rate-limit expires, rather than comparing the X-RateLimit-Reset timestamp to the system time.

    This should only be changed to false if the system is known to have a clock that is out of sync. Relying on the Reset-After header will incur network lag.

    Regardless of this property, we still rely on the system's wall-clock to determine if a bucket is rate-limited; we do not use any monotonic clock. Your system will still need a stable clock.

    | Improve this Doc View Source

    Version

    Gets the Discord.Net version, including the build number.

    Declaration
    public static string Version { get; }
    Property Value
    Type Description
    String

    A string containing the detailed version information, including its build number; Unknown when the version fails to be fetched.

    Theme

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