Class DiscordConfig
Defines various behaviors of Discord.Net.
Inherited Members
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public class DiscordConfig
Fields
| Improve this Doc View SourceAPIUrl
Returns the base Discord API URL.
Declaration
public static readonly string APIUrl
Field Value
| Type | Description |
|---|---|
| System.String | The Discord API URL using APIVersion. |
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 . |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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 SourceDefaultRetryMode
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. |
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. |
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.
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. |
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.
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; |