Class: GuildChannelManager

GuildChannelManager

Manages API methods for GuildChannels and stores their cache.

Constructor

new GuildChannelManager()

Source:

Extends

Members

cache :Collection.<Snowflake, GuildChannel>

The cache of this Manager
Type:
Overrides:
Source:

cacheType :Collection

The type of Collection of the Manager
Type:
  • Collection
Overrides:
Source:

(readonly) client :Client

The client that instantiated this Manager
Type:
Overrides:
Source:

guild :Guild

The guild this Manager belongs to
Type:
Source:

(private, readonly) holds :function

The data structure belonging to this manager
Type:
  • function
Overrides:
Source:

Methods

(async) create(name, optionsopt) → {Promise.<GuildChannel>}

Creates a new channel in the guild.
Parameters:
Name Type Attributes Description
name string The name of the new channel
options Object <optional>
Options
Properties
Name Type Attributes Default Description
type string <optional>
'text' The type of the new channel, either `text`, `voice`, or `category`
topic string <optional>
The topic for the new channel
nsfw boolean <optional>
Whether the new channel is nsfw
bitrate number <optional>
Bitrate of the new channel in bits (only voice)
userLimit number <optional>
Maximum amount of users allowed in the new channel (only voice)
parent ChannelResolvable <optional>
Parent of the new channel
permissionOverwrites Array.<OverwriteResolvable> | Collection.<Snowflake, OverwriteResolvable> <optional>
Permission overwrites of the new channel
position number <optional>
Position of the new channel
rateLimitPerUser number <optional>
The ratelimit per user for the channel
reason string <optional>
Reason for creating the channel
Source:
Returns:
Type
Promise.<GuildChannel>
Examples
// Create a new text channel
guild.channels.create('new-general', { reason: 'Needed a cool new channel' })
  .then(console.log)
  .catch(console.error);
// Create a new channel with permission overwrites
guild.channels.create('new-voice', {
  type: 'voice',
  permissionOverwrites: [
     {
       id: message.author.id,
       deny: ['VIEW_CHANNEL'],
    },
  ],
})

resolve(channel) → {GuildChannel}

Resolves a GuildChannelResolvable to a Channel object.
Parameters:
Name Type Description
channel GuildChannelResolvable The GuildChannel resolvable to resolve
Overrides:
Source:
Returns:
Type
GuildChannel

resolveID(channel) → {Snowflake}

Resolves a GuildChannelResolvable to a channel ID string.
Parameters:
Name Type Description
channel GuildChannelResolvable The GuildChannel resolvable to resolve
Overrides:
Source:
Returns:
Type
Snowflake