mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
docs(Guild): update createChannel examples to not use deprecated overload
This commit is contained in:
@@ -1032,16 +1032,19 @@ class Guild {
|
||||
* @returns {Promise<CategoryChannel|TextChannel|VoiceChannel>}
|
||||
* @example
|
||||
* // Create a new text channel
|
||||
* guild.createChannel('new-general', 'text')
|
||||
* guild.createChannel('new-general', { type: 'text' })
|
||||
* .then(console.log)
|
||||
* .catch(console.error);
|
||||
* @example
|
||||
* // Create a new category channel with permission overwrites
|
||||
* guild.createChannel('new-category', 'category', [{
|
||||
* id: guild.id,
|
||||
* deny: ['MANAGE_MESSAGES'],
|
||||
* allow: ['SEND_MESSAGES']
|
||||
* }])
|
||||
* guild.createChannel('new-category', {
|
||||
* type: 'category',
|
||||
* permissionsOverwrites: [{
|
||||
* id: guild.id,
|
||||
* deny: ['MANAGE_MESSAGES'],
|
||||
* allow: ['SEND_MESSAGES']
|
||||
* }]
|
||||
* })
|
||||
* .then(console.log)
|
||||
* .catch(console.error);
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user