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(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 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.