Skip to content

Commit e495010

Browse files
inklesspenmkrasnitski
authored andcommitted
Add after parameter to get_audit_logs endpoint (#3417)
Fixes #3416
1 parent d3a24ea commit e495010

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/http/client.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2485,9 +2485,10 @@ impl Http {
24852485
action_type: Option<audit_log::Action>,
24862486
user_id: Option<UserId>,
24872487
before: Option<AuditLogEntryId>,
2488+
after: Option<AuditLogEntryId>,
24882489
limit: Option<NonMaxU8>,
24892490
) -> Result<AuditLogs> {
2490-
let (action_type_str, before_str, limit_str, user_id_str);
2491+
let (action_type_str, before_str, after_str, limit_str, user_id_str);
24912492
let mut params = ArrayVec::<_, 4>::new();
24922493
if let Some(action_type) = action_type {
24932494
action_type_str = action_type.num().to_arraystring();
@@ -2497,6 +2498,10 @@ impl Http {
24972498
before_str = before.to_arraystring();
24982499
params.push(("before", &before_str));
24992500
}
2501+
if let Some(after) = after {
2502+
after_str = after.to_arraystring();
2503+
params.push(("after", &after_str));
2504+
}
25002505
if let Some(limit) = limit {
25012506
limit_str = limit.get().to_arraystring();
25022507
params.push(("limit", &limit_str));

src/model/guild/guild_id.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,10 @@ impl GuildId {
286286
action_type: Option<audit_log::Action>,
287287
user_id: Option<UserId>,
288288
before: Option<AuditLogEntryId>,
289+
after: Option<AuditLogEntryId>,
289290
limit: Option<NonMaxU8>,
290291
) -> Result<AuditLogs> {
291-
http.get_audit_logs(self, action_type, user_id, before, limit).await
292+
http.get_audit_logs(self, action_type, user_id, before, after, limit).await
292293
}
293294

294295
/// Gets all of the guild's channels over the REST API.

0 commit comments

Comments
 (0)