Carbon
CoreClasses

GroupDmChannel

Represents a group DM channel.

Extends

Type Parameters

Type ParameterDefault type
IsPartial extends booleanfalse

Constructors

new GroupDmChannel()

new GroupDmChannel<IsPartial>(client, rawDataOrId): GroupDmChannel<IsPartial>

Parameters

ParameterType
clientClient
rawDataOrIdIsPartial extends true ? string : APIGroupDMChannel

Returns

GroupDmChannel<IsPartial>

Inherited from

BaseChannel.constructor

Properties

PropertyModifierTypeDescriptionOverridesInherited from
clientpublicClient--BaseChannel.client
idreadonlystringThe id of the channel.-BaseChannel.id
rawDatapublicnull | APIGroupDMChannelThe raw data of the channel.BaseChannel.rawData-

Accessors

applicationId

get applicationId(): IfPartial<IsPartial, null | string>

The ID of the application that created the channel, if it was created by a bot.

Returns

IfPartial<IsPartial, null | string>


flags

get flags(): IfPartial<IsPartial, undefined | ChannelFlags>

The flags of the channel in a bitfield.

See

https://discord.com/developers/docs/resources/channel#channel-object-channel-flags

Returns

IfPartial<IsPartial, undefined | ChannelFlags>

Inherited from

BaseChannel.flags


icon

get icon(): IfPartial<IsPartial, null | string>

The icon hash of the channel.

Returns

IfPartial<IsPartial, null | string>


iconUrl

get iconUrl(): IfPartial<IsPartial, null | string>

Get the URL of the channel's icon.

Returns

IfPartial<IsPartial, null | string>


lastMessage

get lastMessage(): null | Message<true>

The last message sent in the channel.

Remarks

This might not always resolve to a message. The ID still stays a part of the channel's data, even if the message is deleted. This will always return a partial message, so you can use Message.fetch to get the full message data.

Returns

null | Message<true>


lastMessageId

get lastMessageId(): IfPartial<IsPartial, null | string>

The ID of the last message sent in the channel.

Remarks

This might not always resolve to a message. The ID still stays a part of the channel's data, even if the message is deleted.

Returns

IfPartial<IsPartial, null | string>


managed

get managed(): IfPartial<IsPartial, boolean>

Whether the channel is managed by an Oauth2 application.

Returns

IfPartial<IsPartial, boolean>


name

get name(): IfPartial<IsPartial, null | string>

The name of the channel.

Returns

IfPartial<IsPartial, null | string>


owner

get owner(): User<true>

Get the owner of the channel.

Returns

User<true>


ownerId

get ownerId(): IfPartial<IsPartial, null | string>

The ID of the user who created the channel.

Returns

IfPartial<IsPartial, null | string>


partial

get partial(): IsPartial

Whether the channel is a partial channel (meaning it does not have all the data). If this is true, you should use BaseChannel.fetch to get the full data of the channel.

Returns

IsPartial

Inherited from

BaseChannel.partial


recipients

get recipients(): IfPartial<IsPartial, User<boolean>[]>

The recipients of the channel.

Returns

IfPartial<IsPartial, User<boolean>[]>


type

get type(): IfPartial<IsPartial, Type>

The type of the channel.

Returns

IfPartial<IsPartial, Type>

Inherited from

BaseChannel.type

Methods

fetch()

fetch(): Promise<void>

Fetches the channel from the API.

Returns

Promise<void>

The channel data.

Inherited from

BaseChannel.fetch


setData()

protected setData(data): void

Parameters

ParameterType
dataAPIGroupDMChannel

Returns

void

Inherited from

BaseChannel.setData


setField()

protected setField(field, value): void

Parameters

ParameterType
field"id" | "name" | "last_message_id" | "last_pin_timestamp" | "type" | "flags" | "recipients" | "application_id" | "icon" | "owner_id" | "managed"
valueunknown

Returns

void

Inherited from

BaseChannel.setField


setName()

setName(name): Promise<void>

Set the name of the channel

Parameters

ParameterTypeDescription
namestringThe new name of the channel

Returns

Promise<void>

On this page

Edit on GitHub