Table of Contents

Method GetAuditLogsAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

GetAuditLogsAsync(int?, DiscordMember?, AuditLogActionType?)

Fetches audit log entries for this guild.

[Deprecated("Use GetAuditLogEntriesAsync(DiscordAuditLogQuery? query = null) instead.")]
public Task<IReadOnlyList<DiscordAuditLogEntry>> GetAuditLogsAsync(int? limit = null, DiscordMember? byMember = null, AuditLogActionType? actionType = null)

Parameters

limit int?

The maximum number of entries to fetch. Values above 100 are fetched in multiple requests for compatibility with the legacy overload. null fetches all available entries.

byMember DiscordMember

The acting member filter.

actionType AuditLogActionType?

The action type filter.

Returns

Task<IReadOnlyList<DiscordAuditLogEntry>>

A read-only list of parsed audit log entries.

Remarks

This overload is retained as a compatibility wrapper around GetAuditLogEntriesAsync(DiscordAuditLogQuery?).

The returned list may contain DiscordRawAuditLogEntry instances for action types that are not yet modeled as dedicated typed families.

Exceptions

ArgumentException

Thrown when the compatibility wrapper produces an invalid audit log query.

UnauthorizedException

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

ServerErrorException

Thrown when Discord fails to process the request.