-
Notifications
You must be signed in to change notification settings - Fork 586
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
Add MessageReferenceKind
enum
#2996
Conversation
I don't think we should continue adding |
also right now the |
Sure, chuck a serde default on there as-well to make sure old |
To use the forward message feature the bot needs to have at least the "Read Message History" permissions, |
so while this code is all fine, I think its better to go with a builder and use a |
We are moving away from documenting stuff like that as it may change in future. If it's documented on ddev docs, it wouldn't be the end of the world to duplicate here, but if not we shouldn't. |
this looks a lot more reasonable to me, let me know what you think |
src/builder/create_message.rs
Outdated
@@ -209,7 +210,7 @@ impl CreateMessage { | |||
} | |||
|
|||
/// Set the reference message this message is a reply to. | |||
pub fn reference_message(mut self, reference: impl Into<MessageReference>) -> Self { | |||
pub fn reference_message(mut self, reference: impl Into<CreateMessageReference>) -> Self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change, and either requires targeting to the next
branch or reverting. I would prefer reverting, as we should have support for new discord features on current
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I'll open a PR for next
once this is done so we don't forget :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dont open multiple PRs, the 2 branches are rebased on each other to keep feature parity so whoever rebases it will remove it. Opening multiple PRs will just diverge the branches and make rebasing in the future a pain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this completely unused now? This shouldn't be added for current
, you can make a separate PR after this is merged and next
is rebased to add this builder and swap CreateMessage::reference_message
to use this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can remove this if you want, but I made an from impl to convert a CreateMessageReference into a MessageReference, so not 100% unused but I get your point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, please remove it for now.
Fixes #2994
also adds additional
From<>
implementation for(MessageReferenceKind, ChannelId, MessageId)