Audit Logs implementation (#1055)

* Copy audit logs impl from old branch and clean up

I suck at using git, so I'm gonna use brute force.

* Remove unnecessary TODOs

Category channels do not provide any new information, and the other
I forgot to remove beforehand

* Add invite update data, clean up after feedback

* Remove TODOs, add WebhookType enum for future use

WebhookType is a future-use type, as currently audit logs are the only
thing which may return it.
This commit is contained in:
Finite Reality
2018-05-13 01:46:07 +01:00
committed by Christopher F
parent 97c893107b
commit 39dffe8585
48 changed files with 1576 additions and 3 deletions

View File

@@ -4,10 +4,10 @@ namespace Discord
{
public class DiscordConfig
{
public const int APIVersion = 6;
public const int APIVersion = 6;
public static string Version { get; } =
typeof(DiscordConfig).GetTypeInfo().Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion ??
typeof(DiscordConfig).GetTypeInfo().Assembly.GetName().Version.ToString(3) ??
typeof(DiscordConfig).GetTypeInfo().Assembly.GetName().Version.ToString(3) ??
"Unknown";
public static string UserAgent { get; } = $"DiscordBot (https://github.com/RogueException/Discord.Net, v{Version})";
@@ -20,10 +20,11 @@ namespace Discord
public const int MaxMessagesPerBatch = 100;
public const int MaxUsersPerBatch = 1000;
public const int MaxGuildsPerBatch = 100;
public const int MaxAuditLogEntriesPerBatch = 100;
/// <summary> Gets or sets how a request should act in the case of an error, by default. </summary>
public RetryMode DefaultRetryMode { get; set; } = RetryMode.AlwaysRetry;
/// <summary> Gets or sets the minimum log level severity that will be sent to the Log event. </summary>
public LogSeverity LogLevel { get; set; } = LogSeverity.Info;