You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can already specify a name for the category, there's no reason to limit this.
What is the feature request for?
The core library
The Problem
Let's say that someone is trying to create a 1:1 copy of a category, with all of its channels included. Currently, you'd do it with (2n+1) API calls, where n = number of channels inside a category.
Creating a new category
Cloning the channel in its current category
Moving the new channel to the new category.
The Ideal Solution
This can be a bit tedious to code, and it also seems like a useless step, which could be avoided by adding a keyword-only optional argument, called "parent" or "category". This could accept either a CategoryChannel or an ID that points to a category inside the guild. If the given parent is invalid, it would raise a ValueError.
While this may seem like a small feature that is useless to most people, it could be really important in a bot which copies/clones categories. If a category had 50 channels for example, you'd need (2*50+1) = 101!!! API calls, almost half of which could be discarded by simply allowing people to actually choose a destination.
An other possible solution would be to add a data: dict argument to the clone implementation method, which would be harder for newbies to discover, but it would be much easier to use compared to making an attribute for everything that a channel can use when cloning.
The Current Solution
Currently, the best you can do is (as said above) clone and move the channel to another category. Cloning and moving takes twice the API calls to actually perform, this could be reduced by half with this feature's implementation.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Summary
You can already specify a name for the category, there's no reason to limit this.
What is the feature request for?
The core library
The Problem
Let's say that someone is trying to create a 1:1 copy of a category, with all of its channels included. Currently, you'd do it with (2n+1) API calls, where n = number of channels inside a category.
The Ideal Solution
This can be a bit tedious to code, and it also seems like a useless step, which could be avoided by adding a keyword-only optional argument, called "parent" or "category". This could accept either a
CategoryChannel
or an ID that points to a category inside the guild. If the given parent is invalid, it would raise a ValueError.While this may seem like a small feature that is useless to most people, it could be really important in a bot which copies/clones categories. If a category had 50 channels for example, you'd need (2*50+1) = 101!!! API calls, almost half of which could be discarded by simply allowing people to actually choose a destination.
An other possible solution would be to add a
data: dict
argument to the clone implementation method, which would be harder for newbies to discover, but it would be much easier to use compared to making an attribute for everything that a channel can use when cloning.The Current Solution
Currently, the best you can do is (as said above) clone and move the channel to another category. Cloning and moving takes twice the API calls to actually perform, this could be reduced by half with this feature's implementation.
Additional Context
No response
The text was updated successfully, but these errors were encountered: