Skip to main content

Class DiscordConfig

Defines various behaviors of Discord.Net.

Assembly: Discord.Net.Core.dll​
View Source​
Declaration
public class DiscordConfig

Properties​

Version​

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

View Source​
Declaration
public static string Version { get; }

UserAgent​

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

View Source​
Declaration
public static string UserAgent { get; }

DefaultRetryMode​

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

View Source​
Declaration
public RetryMode DefaultRetryMode { get; set; }

LogLevel​

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

View Source​
Declaration
public LogSeverity LogLevel { get; set; }

UseSystemClock​

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

View Source​
Declaration
public bool UseSystemClock { get; set; }

UseInteractionSnowflakeDate​

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

  • snowflake date to check if an interaction can be responded to.
View Source​
Declaration
public bool UseInteractionSnowflakeDate { get; set; }

Fields​

APIVersion​

Returns the API version Discord.Net uses.

View Source​
Declaration
public const int APIVersion = 9

VoiceAPIVersion​

Returns the Voice API version Discord.Net uses.

View Source​
Declaration
public const int VoiceAPIVersion = 3

APIUrl​

Returns the base Discord API URL.

View Source​
Declaration
public static readonly string APIUrl

CDNUrl​

Returns the base Discord CDN URL.

View Source​
Declaration
public const string CDNUrl = "https://cdn.discordapp.com/"

InviteUrl​

Returns the base Discord invite URL.

View Source​
Declaration
public const string InviteUrl = "https://discord.gg/"

DefaultRequestTimeout​

Returns the default timeout for requests.

View Source​
Declaration
public const int DefaultRequestTimeout = 15000

MaxMessageSize​

Returns the max length for a Discord message.

View Source​
Declaration
public const int MaxMessageSize = 2000

MaxMessagesPerBatch​

Returns the max messages allowed to be in a request.

View Source​
Declaration
public const int MaxMessagesPerBatch = 100

MaxUsersPerBatch​

Returns the max users allowed to be in a request.

View Source​
Declaration
public const int MaxUsersPerBatch = 1000

MaxGuildEventUsersPerBatch​

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

View Source​
Declaration
public const int MaxGuildEventUsersPerBatch = 100

MaxGuildsPerBatch​

Returns the max guilds allowed to be in a request.

View Source​
Declaration
public const int MaxGuildsPerBatch = 100

MaxUserReactionsPerBatch​

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

View Source​
Declaration
public const int MaxUserReactionsPerBatch = 100

MaxAuditLogEntriesPerBatch​

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

View Source​
Declaration
public const int MaxAuditLogEntriesPerBatch = 100