Class DiscordConfig
Defines various behaviors of Discord.Net.
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public class DiscordConfig : object
Fields
| Improve this Doc View SourceAPIUrl
Returns the base Discord API URL.
Declaration
public static readonly string APIUrl
Field Value
Type | Description |
---|---|
String | The Discord API URL using APIVersion. |
APIVersion
Returns the API version Discord.Net uses.
Declaration
public const int APIVersion = null
Field Value
Type | Description |
---|---|
Int32 | An 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 = null
Field Value
Type | Description |
---|---|
String | The base Discord Content Delivery Network (CDN) URL. |
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. |
InviteUrl
Returns the base Discord invite URL.
Declaration
public const string InviteUrl = null
Field Value
Type | Description |
---|---|
String | The base Discord invite URL. |
MaxApplicationDescriptionLength
Returns the max length of an application description.
Declaration
public const int MaxApplicationDescriptionLength = null
Field Value
Type | Description |
---|---|
Int32 |
MaxApplicationTagLength
Returns the max length of an application tag.
Declaration
public const int MaxApplicationTagLength = null
Field Value
Type | Description |
---|---|
Int32 |
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. |
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. |
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 |
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. |
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. |
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. |
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. |
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 |
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. |
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. |
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. |
VoiceAPIVersion
Returns the Voice API version Discord.Net uses.
Declaration
public const int VoiceAPIVersion = null
Field Value
Type | Description |
---|---|
Int32 | An |
Properties
| Improve this Doc View SourceDefaultRatelimitCallback
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.
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. |
FormatUsersInBidirectionalUnicode
Gets or sets if the Rest/Socket user
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".
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. |
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.
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. |
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.
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; |