mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Backport: Guild#createChannel (#2145)
* Backport: Guild#createChannel * this should not return a buffer
This commit is contained in:
@@ -873,11 +873,19 @@ class Guild {
|
||||
if (!this.client.user.bot) this.client.syncGuilds([this]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to overwrite permissions when creating a channel.
|
||||
* @typedef {Object} ChannelCreationOverwrites
|
||||
* @property {PermissionResolvable[]|number} [allow] The permissions to allow
|
||||
* @property {PermissionResolvable[]|number} [deny] The permissions to deny
|
||||
* @property {RoleResolvable|UserResolvable} id ID of the role or member this overwrite is for
|
||||
*/
|
||||
|
||||
/**
|
||||
* Creates a new channel in the guild.
|
||||
* @param {string} name The name of the new channel
|
||||
* @param {string} type The type of the new channel, either `text` or `voice` or `category`
|
||||
* @param {Array<PermissionOverwrites|Object>} [overwrites] Permission overwrites to apply to the new channel
|
||||
* @param {Array<PermissionOverwrites|ChannelCreationOverwrites>} [overwrites] Permission overwrites
|
||||
* @param {string} [reason] Reason for creating this channel
|
||||
* @returns {Promise<TextChannel|VoiceChannel>}
|
||||
* @example
|
||||
|
||||
Reference in New Issue
Block a user