docs(GuildChannelManager): fix type options in description (#5440)

This commit is contained in:
anandre
2021-04-14 17:39:12 -05:00
committed by GitHub
parent 7b161f93a0
commit 936516cb9c
2 changed files with 5 additions and 2 deletions

View File

@@ -62,7 +62,8 @@ class GuildChannelManager extends BaseManager {
* Creates a new channel in the guild.
* @param {string} name The name of the new channel
* @param {Object} [options] Options
* @param {string} [options.type='text'] The type of the new channel, either `text`, `voice`, or `category`
* @param {string} [options.type='text'] The type of the new channel, either `text`, `voice`, `category`, `news`,
* or `store`
* @param {string} [options.topic] The topic for the new channel
* @param {boolean} [options.nsfw] Whether the new channel is nsfw
* @param {number} [options.bitrate] Bitrate of the new channel in bits (only voice)

4
typings/index.d.ts vendored
View File

@@ -1971,10 +1971,12 @@ declare module 'discord.js' {
public create(name: string, options: GuildCreateChannelOptions & { type: 'voice' }): Promise<VoiceChannel>;
public create(name: string, options: GuildCreateChannelOptions & { type: 'category' }): Promise<CategoryChannel>;
public create(name: string, options?: GuildCreateChannelOptions & { type?: 'text' }): Promise<TextChannel>;
public create(name: string, options: GuildCreateChannelOptions & { type: 'news' }): Promise<NewsChannel>;
public create(name: string, options: GuildCreateChannelOptions & { type: 'store' }): Promise<StoreChannel>;
public create(
name: string,
options: GuildCreateChannelOptions,
): Promise<TextChannel | VoiceChannel | CategoryChannel>;
): Promise<TextChannel | VoiceChannel | CategoryChannel | NewsChannel | StoreChannel>;
}
export class GuildEmojiManager extends BaseGuildEmojiManager {