Skip to content

Message.referenced_message field doesn't exist or is null ambiguous  #2263

@laralove143

Description

@laralove143

Discord docs say that the distinction is significant:

**** This field is only returned for messages with a type of 19 (REPLY) or 21 (THREAD_STARTER_MESSAGE). If the message is a reply but the referenced_message field is not present, the backend did not attempt to fetch the message that was being replied to, so its state is unknown. If the field exists but is null, the referenced message was deleted.

But Twilight maps both cases to None

What should be our solution here? Nesting two Options? Although there's a lint against it in clippy::pedantic, we do it in other places too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c-modelAffects the model crate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions