twilight
twilight copied to clipboard
`Message.referenced_message` field doesn't exist or is `null` ambiguous
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 Option
s? Although there's a lint against it in clippy::pedantic
, we do it in other places too.