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
feat(CategoryChannel): add createChannel shortcut method #6614
Conversation
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.
Smallest nit, but can be merged without it so LGTM
I don't think that this method brings any needed utility to the library. Adding a method that AFAIK is only on managers to separate class seems like it's cluttering up the library for no good reason. All this does is add more to the library for the convenience of setting one value for the user. Recently, the library has been removing extraneous helper/utility methods, and this is going in exactly the opposite direction. |
@anandre the methods the library has been recently removing are only ones that were unreliable and caused more hassles than they solved (e.g. typing-related properties and methods, User#presence, etc). This method is indeed a convenience and I recognize that it would be better to have a children manager, however, that cannot be done until v14. If the reviewers prefer we can hold this off and transform CategoryChannel#children into a manager later on, however I don't see why this couldn't be added personally as it is quite convenient (e.g. to be used with a CHANNEL option in a slash command where you'd be able to call the method directly instead of using the channel's ID in the manager's method) and seems to be getting some positive feedback too. Along with that, methods like this exist all across the library e.g. GuildMember#setX that all call the GuildMember#edit method, and others on other classes too, so I don't see why this shouldn't be added |
Please describe the changes this PR makes and why it should be merged:
This PR adds a method to CategoryChannel called createChannel that creates a channel inside that category. It also fixes a bug in the options interface to disallow GUILD_NEWS_THREAD types on both the GuildChannelCreateOptions and the CategoryCreateChannelOptions interfaces
Status and versioning classification: