Skip to content

Audit Log Change variants are undocumented #2112

@vilgotf

Description

@vilgotf

Whilst discussing #2110 in Discord (https://discord.com/channels/745809834183753828/1070716906098671706) it came up that Discord no longer documents the AuditLogChange variants. We should therefore, as usually, remove the variants ourselves too, transforming it into a struct where new_value and old_value can be of any type.

I can think of three ways to achieve this:

  1. Expose the values as serde_json::Value or simd_json::value::owned::Value. Downside: new feature flags for twilight-model.
  2. Expose the values as serde_value::Value (which is already a dependency). Downside: awkward to use for users.
  3. Expose the values as raw JSON (of type String) by deserializing and reserializing them back to strings (trickier than it seems to optimize out). This is what Remora does, as can be seen here Remora/Remora.Discord@ddb3ddb.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c-modelAffects the model crated-apiChange related to Discord's API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions