GuildChannel

GuildChannel

new GuildChannel()

Source:
Properties:
Name Type Description
guild Guild

The guild the channel is in

id Snowflake

The id of the guild channel

name String

The name of the guild channel

permissionOverwrites Array

An array of Permission Overwrites for the channel

position Number

The position of the Channel

type String

The type of the channel

  • text If the channel is a text channel
  • dm If the channel is a dm channel
  • voice If the channel is a voice channel
  • groupdm If the channel is a group dm channel
  • category if the channel is a Channel Category

Extends

Methods

changePermissions(userOrRole, optionsopt) → {Promise.<(Member|Role)>}

Source:

Edits the channel permission for the user or role

Parameters:
Name Type Attributes Description
userOrRole Snowflake

The id of the user or role

options Object <optional>

Options for the permission change

Properties
Name Type Attributes Description
allow String <optional>

The name of the permission to allow for the role or user

deny String <optional>

The name of the permission to deny for the role or user

type String <optional>

"member" for a user or "role" for a role

Returns:
Type
Promise.<(Member|Role)>

close() → {Promise.<(TextChannel|VoiceChannel|CategoryChannell)>}

Source:

Closes a channel

Returns:
Type
Promise.<(TextChannel|VoiceChannel|CategoryChannell)>

createInvite(optionsopt) → {Promise.<Invite>}

Source:

Creates an invite for the guild channel

Parameters:
Name Type Attributes Description
options Object <optional>

Options for creating the invite

Properties
Name Type Attributes Default Description
maxAge Number <optional>
86400

Duration of invite in seconds, or 0 for never

maxUses Number <optional>
0

Maximum uses for the invite, or 0 for unlimited

temporary Boolean <optional>
false

Whether this invite should be temporary

unique= Boolean <optional>

If true, don't try to reuse a similar invite

Returns:
Type
Promise.<Invite>

delete() → {Promise.<(TextChannel|VoiceChannel|CategoryChannell)>}

Source:

Similar to GuildChannel#delete. Closes a channel

Returns:
Type
Promise.<(TextChannel|VoiceChannel|CategoryChannell)>

edit(nameopt, positionopt) → {Promise.<(TextChannel|VoiceChannel|CategoryChannel)>}

Source:

Edits the channel

Parameters:
Name Type Attributes Description
name String <optional>

The new name of the channel

position Number <optional>

The new position of the channel

Returns:
Type
Promise.<(TextChannel|VoiceChannel|CategoryChannel)>

getInvites() → {Promise.<Array.<Invite>>}

Source:

Returns an array of Channel Invites

Returns:
Type
Promise.<Array.<Invite>>