twilight icon indicating copy to clipboard operation
twilight copied to clipboard

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

Open laralove143 opened this issue 1 year ago • 0 comments

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.

laralove143 avatar Aug 15 '23 13:08 laralove143