GroupChannel

GroupChannel

Represents a group channel. Bots cannot get data for user-created Group channels. See Channel for additional properties

Constructor

new GroupChannel()

Properties:
Name Type Attributes Description
applicationID String

The application ID of the bot that created the group DM

icon String <nullable>

The hash of the group channel icon

iconURL String <nullable>

The URL of the group channel icon

lastMessageID String <nullable>

The ID of the last message in this channel

lastPinTimestamp Number <nullable>

The timestamp of the last pinned message

managed Boolean

Whether the group channel is managed by an application (should always be true)

name String

The name of the group channel

ownerID String

The ID of the user that is the group owner

recipients Collection.<User>

The recipients in the group channel

Source:

Extends

Methods

addRecipient(userID, options) → {Promise}

Add a user to the group

Source:
Parameters:
Name Type Description
userID String

The ID of the user to add

options Object

The options for adding the user

Name Type Attributes Description
accessToken String

The access token of the user to add. Requires having been authorized with the gdm.join scope

nick String <optional>

The nickname to give the user

Returns:
Type:
Promise

delete() → {Promise.<GroupChannel>}

Delete the Group Channel

Source:
Returns:
Type:
Promise.<GroupChannel>

dynamicIconURL(formatopt, sizeopt) → (nullable) {String}

Get the group's icon with the given format and size

Source:
Parameters:
Name Type Attributes Description
format String <optional>

The filetype of the icon ("jpg", "jpeg", "png", "gif", or "webp")

size Number <optional>

The size of the icon (any power of two between 16 and 4096)

Returns:
Type:
String

edit(options) → {Promise.<GroupChannel>}

Edit the channel's properties

Source:
Parameters:
Name Type Description
options Object

The properties to edit

Name Type Attributes Description
icon String <optional>
<nullable>

The icon of the channel as a base64 data URI (group channels only). Note: base64 strings alone are not base64 data URI strings

name String <optional>

The name of the channel

Returns:
Type:
Promise.<GroupChannel>

removeRecipient(userID) → {Promise}

Remove a user from the group

Source:
Parameters:
Name Type Description
userID String

The ID of the target user

Returns:
Type:
Promise