Skip to content

Commit 77a74e0

Browse files
authored
Add after parameter to get_audit_logs endpoint (#3417)
Fixes #3416
1 parent b6d81d9 commit 77a74e0

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
@@ -285,9 +285,10 @@ impl GuildId {
285285
action_type: Option<audit_log::Action>,
286286
user_id: Option<UserId>,
287287
before: Option<AuditLogEntryId>,
288+
after: Option<AuditLogEntryId>,
288289
limit: Option<NonMaxU8>,
289290
) -> Result<AuditLogs> {
290-
http.get_audit_logs(self, action_type, user_id, before, limit).await
291+
http.get_audit_logs(self, action_type, user_id, before, after, limit).await
291292
}
292293

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

0 commit comments

Comments
 (0)