JDA
JDA copied to clipboard
Add Attachment Support to MessageBuilder
- [x] I have checked for similar issues.
- [x] I have updated to the [latest JDA version][download].
- [x] I have checked the branches or the maintainers' PRs for upcoming features.
Feature Request
Add support for file attachments to the MessageBuilder class. MessageBuilder currently provides most options for construction of a new Message, but Attachment support is conspicuously absent.
Example Use-Case
When two or more objects are collaborating on the construction of a Message, pass a MessageBuilder around as a container. Use the new functionality to attach files, when necessary.
Alternative Option
Add getter methods to MessageAction. MessageAction supports mutable Message construction, similar to MessageBuilder, and does provide Attachment support. However, it does not offer any way to read data already inside it. This can be quite inconvenient if collaborating objects need to read each other's contributions to a Message under construction.
We are intending to introduce interfaces to unify the MessageBuilder and the MessageAction related RestActions in v5 which will bring support for attachments to MessageBuilder
That sounds perfect, actually.
@MinnDevelopment Awesome! Thanks man!