Table of Contents

Method GetAuditLogEntriesAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

GetAuditLogEntriesAsync(DiscordAuditLogQuery?)

Fetches audit log entries for this guild.

public Task<DiscordAuditLogPage> GetAuditLogEntriesAsync(DiscordAuditLogQuery? query = null)

Parameters

query DiscordAuditLogQuery

The audit log query. If null, Discord's default ordering and limit are used.

Returns

Task<DiscordAuditLogPage>

A parsed audit log page.

Remarks

Discord returns descending pages when using before and ascending pages when using after.

Some audit log actions do not emit Changes and instead only provide Options.

Undocumented or internal Discord action types are preserved and returned as DiscordRawAuditLogEntry unless DisCatSharp has a dedicated typed family for them.

Exceptions

ArgumentException

Thrown when both Before and After are supplied.

UnauthorizedException

Thrown when the client does not have ViewAuditLog in this guild.

ServerErrorException

Thrown when Discord fails to process the request.