Extends
Members
cache :Collection.<Snowflake, GuildChannel>
The cache of this Manager
Type:
- Collection.<Snowflake, GuildChannel>
- 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:
(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
|
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