Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
laralove143 opened this issue Aug 15, 2023 · 0 comments
Open

Comments

@laralove143
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant