Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes the createChannel typings.
The current typings make it impossible for anyone to create a channel as it expects a
string
and Typescript throws errors because in reality it requires a number. Not being able to pass a number is preventing me from making channels. HIGH PRIORITY PLEASE Can we consider hotpatching this into master as its only typings changes but its a massive issue. 馃檹Although it is labelled as an optional at the moment, the
type
is required making it incorrect as well. This should also be fixed now to make it properly optional.reason
is a parameter and was not present in the typings. It is now.Added some overloads to the typings for createChannel for it to be much cleaner for TS devs. Now depending on the
type
that is provided, it will return the proper Channel Type as well.unknown
. Let me know if you would prefer to keep this as<AnyGuildChannel>
This PR also fixes the following:
Collection<AnyGuildChannel>
=>Collection<TextChannel | VoiceChannel>