Show / Hide Table of Contents

Class DiscordConfig

Defines various behaviors of Discord.Net.

Inheritance
System.Object
DiscordConfig
DiscordRestConfig
Inherited Members
System.Object.ToString()
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()
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public class DiscordConfig

Fields

| Improve this Doc View Source

APIUrl

Returns the base Discord API URL.

Declaration
public static readonly string APIUrl
Field Value
Type Description
System.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 = 6
Field Value
Type Description
System.Int32

An System.Int32 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 = "https://cdn.discordapp.com/"
Field Value
Type Description
System.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 = 15000
Field Value
Type Description
System.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 = "https://discord.gg/"
Field Value
Type Description
System.String

The base Discord invite URL.

| Improve this Doc View Source

MaxAuditLogEntriesPerBatch

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

Declaration
public const int MaxAuditLogEntriesPerBatch = 100
Field Value
Type Description
System.Int32

The maximum number of audit log entries 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 = 100
Field Value
Type Description
System.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 = 2000
Field Value
Type Description
System.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 = 100
Field Value
Type Description
System.Int32

The maximum number of messages 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 = 100
Field Value
Type Description
System.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 = 1000
Field Value
Type Description
System.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 = 3
Field Value
Type Description
System.Int32

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

Properties

| 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

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

RateLimitPrecision

Gets or sets the level of precision of the rate limit reset response.

Declaration
public RateLimitPrecision RateLimitPrecision { get; set; }
Property Value
Type Description
RateLimitPrecision

The currently set RateLimitPrecision.

Remarks

If set to Second, this value will be rounded up to the nearest second.

| 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
System.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
System.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
System.String

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

  • Improve this Doc
  • View Source
Back to top Generated by DocFX