feat(modal, embeds): new method for Embed and metaclass for class Modal#1254
feat(modal, embeds): new method for Embed and metaclass for class Modal#1254shayzi3 wants to merge 2 commits intoDisnakeDev:masterfrom
Conversation
|
If you really want to add multiple fields at once you could use The proposed change for modals is absolutely a breaking change, you should first try to discuss this with maintainers before making a PR. |
|
Thanks for the PR! First off, please try to keep PRs limited to one feature/fix at a time, otherwise it makes maintaining/reviewing much more difficult. Feel free to open as many as you'd like, though. :) That said, regarding the two additions: embedsI agree with @Snipy7374 that a method like modalsThis is a breaking change, but a reasonable idea overall. Components in general will undergo a significant refactoring in the next major version (3.0), so it might make sense to bundle this feature with those changes, since breaking changes are inevitable there. Would have to put this one the back burner until then, though.
|
Summary
Embed
New method Embed.add_some_fields in order to be able to create multiple fields at once without using add_field multiple times.
For example,
Modal
I also think that you need to create a Modal using metaclass. This improves readability.
Example
Checklist
pdm lintpdm pyright