Skip to content

Commit

Permalink
Rename ambiguious Options to AuditLogEntryOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
GnomedDev committed Nov 18, 2024
1 parent 31d8fb3 commit 0bd962a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/testing/src/model_type_sizes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ pub fn print_ranking() {
("MessageUpdateEvent", std::mem::size_of::<MessageUpdateEvent>()),
("ModalInteraction", std::mem::size_of::<ModalInteraction>()),
("ModalInteractionData", std::mem::size_of::<ModalInteractionData>()),
("Options", std::mem::size_of::<Options>()),
("AuditLogEntryOptions", std::mem::size_of::<AuditLogEntryOptions>()),
("PartialChannel", std::mem::size_of::<PartialChannel>()),
("PartialCurrentApplicationInfo", std::mem::size_of::<PartialCurrentApplicationInfo>()),
("PartialGuild", std::mem::size_of::<PartialGuild>()),
Expand Down
5 changes: 2 additions & 3 deletions src/model/guild/audit_log/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,15 +388,14 @@ pub struct AuditLogEntry {
/// The id of this entry.
pub id: AuditLogEntryId,
/// Some optional data associated with this entry.
pub options: Option<Options>,
pub options: Option<AuditLogEntryOptions>,
}

/// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-optional-audit-entry-info).
// TODO: should be renamed to a less ambiguous name
#[cfg_attr(feature = "typesize", derive(typesize::derive::TypeSize))]
#[derive(Debug, Deserialize, Serialize, Clone)]
#[non_exhaustive]
pub struct Options {
pub struct AuditLogEntryOptions {
/// Name of the Auto Moderation rule that was triggered.
pub auto_moderation_rule_name: Option<FixedString>,
/// Trigger type of the Auto Moderation rule that was triggered.
Expand Down

0 comments on commit 0bd962a

Please sign in to comment.