pub struct GetAuditLog<'a> { /* private fields */ }
Expand description

Get the audit log for a guild.

Examples

use twilight_http::Client;
use twilight_model::id::Id;

let client = Client::new("token".to_owned());

let guild_id = Id::new(101);
let audit_log = client
    .audit_log(guild_id)
    .exec()
    .await?
    .model()
    .await?;

for entry in audit_log.entries {
    println!("ID: {}", entry.id);
    println!("  Action Type: {}", entry.action_type as u8);
    println!("  Changes:");

    for change in entry.changes {
        println!("{:?}", change);
    }
}

Implementations

Filter by an action type.

Get audit log entries before the entry specified.

Set the maximum number of audit logs to retrieve.

The minimum is 1 and the maximum is 100.

Errors

Returns an error of type GetGuildAuditLog if the limit is 0 or greater than 100.

Filter audit log for entries from a user.

This is the user who did the auditable action, not the target of the auditable action.

Execute the request, returning a future resolving to a Response.

Trait Implementations

Try to convert a request builder into a raw Request. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more