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.
pub fn exec(self) -> ResponseFuture<AuditLog>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
pub fn exec(self) -> ResponseFuture<AuditLog>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
Notable traits for ResponseFuture<T>
impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
Execute the request, returning a future resolving to a Response
.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for GetAuditLog<'a>
impl<'a> Send for GetAuditLog<'a>
impl<'a> Sync for GetAuditLog<'a>
impl<'a> Unpin for GetAuditLog<'a>
impl<'a> !UnwindSafe for GetAuditLog<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
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