Skip to content

Commit

Permalink
Fix AuditLogEntry::user_id (serenity-rs#2846)
Browse files Browse the repository at this point in the history
This field is documented as nullable but that isn't reflected in the
model. I also took the opportunity to replace the Option<Vec> with a
default Vec.
  • Loading branch information
GnomedDev committed Jun 9, 2024
1 parent ab8b4cc commit 87345a0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/model/guild/audit_log/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,10 @@ pub struct AuditLogEntry {
/// What was the reasoning by doing an action on a target? If there was one.
pub reason: Option<FixedString>,
/// The user that did this action on a target.
pub user_id: UserId,
pub user_id: Option<UserId>,
/// What changes were made.
pub changes: Option<Vec<Change>>,
#[serde(default)]
pub changes: Vec<Change>,
/// The id of this entry.
pub id: AuditLogEntryId,
/// Some optional data associated with this entry.
Expand Down

0 comments on commit 87345a0

Please sign in to comment.