Method GetAuditLogsAsync
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
GetAuditLogsAsync(int?, DiscordMember?, DiscordAuditLogActionType?)
Gets audit log entries for this guild.
public IAsyncEnumerable<DiscordAuditLogEntry> GetAuditLogsAsync(int? limit = 100, DiscordMember? byMember = null, DiscordAuditLogActionType? actionType = null)
Parameters
limit
int?Maximum number of entries to fetch. Defaults to 100
byMember
DiscordMemberFilter by member responsible.
actionType
DiscordAuditLogActionType?Filter by action type.
Returns
- IAsyncEnumerable<DiscordAuditLogEntry>
A collection of requested audit log entries.
Remarks
If you set limit
to null, it will fetch all entries. This may take a while as it will result in multiple api calls
Exceptions
- UnauthorizedException
Thrown when the client does not have the ViewAuditLog permission.
- ServerErrorException
Thrown when Discord is unable to process the request.