You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

DiscordConfig.cs 1.7 kB

8 years ago
1234567891011121314151617181920212223242526272829303132333435
  1. using System.Reflection;
  2. namespace Discord
  3. {
  4. public class DiscordConfig
  5. {
  6. public const int APIVersion = 6;
  7. public static string Version { get; } =
  8. typeof(DiscordConfig).GetTypeInfo().Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion ??
  9. typeof(DiscordConfig).GetTypeInfo().Assembly.GetName().Version.ToString(3) ??
  10. "Unknown";
  11. public static string UserAgent { get; } = $"DiscordBot (https://github.com/RogueException/Discord.Net, v{Version})";
  12. public static readonly string APIUrl = $"https://discordapp.com/api/v{APIVersion}/";
  13. public const string CDNUrl = "https://cdn.discordapp.com/";
  14. public const string InviteUrl = "https://discord.gg/";
  15. public const int DefaultRequestTimeout = 15000;
  16. public const int MaxMessageSize = 2000;
  17. public const int MaxMessagesPerBatch = 100;
  18. public const int MaxUsersPerBatch = 1000;
  19. public const int MaxGuildsPerBatch = 100;
  20. public const int MaxUserReactionsPerBatch = 100;
  21. public const int MaxAuditLogEntriesPerBatch = 100;
  22. /// <summary> Gets or sets how a request should act in the case of an error, by default. </summary>
  23. public RetryMode DefaultRetryMode { get; set; } = RetryMode.AlwaysRetry;
  24. /// <summary> Gets or sets the minimum log level severity that will be sent to the Log event. </summary>
  25. public LogSeverity LogLevel { get; set; } = LogSeverity.Info;
  26. /// <summary> Gets or sets whether the initial log entry should be printed. </summary>
  27. internal bool DisplayInitialLog { get; set; } = true;
  28. }
  29. }