Struct twilight_http::request::guild::get_audit_log::GetAuditLog[][src]

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

Get the audit log for a guild.

Examples

use twilight_http::Client;
use twilight_model::id::GuildId;

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

let guild_id = GuildId::new(101).expect("non zero");
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 a GetAuditLogErrorType::LimitInvalid error type 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.

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