|
@@ -2,20 +2,29 @@ |
|
|
|
|
|
|
|
|
namespace Discord |
|
|
namespace Discord |
|
|
{ |
|
|
{ |
|
|
|
|
|
/// <summary> Stores common configuration settings </summary> |
|
|
public class DiscordConfig |
|
|
public class DiscordConfig |
|
|
{ |
|
|
{ |
|
|
public const int APIVersion = 6; |
|
|
|
|
|
|
|
|
/// <summary> The version of Discord's REST API which is used </summary> |
|
|
|
|
|
public const int APIVersion = 6; |
|
|
|
|
|
/// <summary> Version information about Discord.Net </summary> |
|
|
public static string Version { get; } = |
|
|
public static string Version { get; } = |
|
|
typeof(DiscordConfig).GetTypeInfo().Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion ?? |
|
|
typeof(DiscordConfig).GetTypeInfo().Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion ?? |
|
|
typeof(DiscordConfig).GetTypeInfo().Assembly.GetName().Version.ToString(3) ?? |
|
|
typeof(DiscordConfig).GetTypeInfo().Assembly.GetName().Version.ToString(3) ?? |
|
|
"Unknown"; |
|
|
"Unknown"; |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> The base URL for all REST API requests </summary> |
|
|
public static readonly string ClientAPIUrl = $"https://discordapp.com/api/v{APIVersion}/"; |
|
|
public static readonly string ClientAPIUrl = $"https://discordapp.com/api/v{APIVersion}/"; |
|
|
|
|
|
/// <summary> The base URL for all CDN requests </summary> |
|
|
public const string CDNUrl = "https://discordcdn.com/"; |
|
|
public const string CDNUrl = "https://discordcdn.com/"; |
|
|
|
|
|
/// <summary> The base URL for all invite links </summary> |
|
|
public const string InviteUrl = "https://discord.gg/"; |
|
|
public const string InviteUrl = "https://discord.gg/"; |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> The maximum amount of characters which can be sent in a message </summary> |
|
|
public const int MaxMessageSize = 2000; |
|
|
public const int MaxMessageSize = 2000; |
|
|
|
|
|
/// <summary> The maximum number of messages which can be received in a batch </summary> |
|
|
public const int MaxMessagesPerBatch = 100; |
|
|
public const int MaxMessagesPerBatch = 100; |
|
|
|
|
|
/// <summary> The maximum number of users which can be received in a batch </summary> |
|
|
public const int MaxUsersPerBatch = 1000; |
|
|
public const int MaxUsersPerBatch = 1000; |
|
|
|
|
|
|
|
|
/// <summary> Gets or sets the minimum log level severity that will be sent to the LogMessage event. </summary> |
|
|
/// <summary> Gets or sets the minimum log level severity that will be sent to the LogMessage event. </summary> |
|
|