Kord-Extensions/kord-extensions

View model for message components

Miss-Corruption opened this issue · 2 comments

Summary

As we discussed on Discord, the implementation of a View class, similar to how disnake handles them (examples can be found here)

Preferred Behaviour

With the ability to create a class for commonly used views such as pagination, confirmation etc. (example for confirmation here) it would reduce redundancy while also maintaining ease-of-use.

Suggestions

My suggestion would be a view argument in UserMessageCreateBuilder, so it could look like createMessage(view=Confirm) {...}. Granted, I do not know if that is within scope.

Hello, and thanks for opening an issue! As this is the first time you've created an issue on this repository, we'd just like to offer you a warm welcome to the project, and the following pointers:

  • Most importantly, all issues must adhere to our Code of Conduct. Please give it a quick read if you haven't already.

  • While our team is passionate about the projects we've created here, we're all volunteers. Please don't be offended if it takes time for us to get to your issue - we'll be here as soonas we can be!

  • Please provide as much information as possible when asking a question, reporting a problem, or submitting a feature request. This will help us to address your issue quickly and efficiently. If you forgot to add some information, no worries - feel free to edit the issue and add anything you missed!

    Thanks for contacting us! If you have any further questions, please feel free to join us on Discord in the #dev-kotdis channel (or #kordex-discussion for Kord Extensions projects), or to contact a staff member directly.

Interesting concept - I think this is probably a good way to go given how Kord's APIs work (and that I refuse to maintain a fork of it), though it definitely couldn't be part of createMessage - that's why the components builder doesn't do this already!