PartialGroupDMChannel

export class PartialGroupDMChannel extends BaseChannel
export class PartialGroupDMChannel extends BaseChannel
Represents a Partial Group DM Channel on Discord.
Readonly
client:Client<true>
The client that instantiated this
Inherited from Base
Readonly
createdAt:Date | null
The time the channel was created at
Inherited from BaseChannel
Readonly
createdTimestamp:number | null
The timestamp the channel was created at
Inherited from BaseChannel
flags:null
The flags that are applied to the channel. This is only null in a . In all other cases, it is not null.
icon:string | null
The hash of the channel icon
The channel's id
Inherited from BaseChannel
Readonly
lastMessage?:Message
The Message object of the last message in the channel, if one was sent
lastMessageId?:Snowflake
The channel's last message id, if one was sent
Readonly
lastPinAt?:Date
The date when the last pinned message was pinned, if there was one
lastPinTimestamp?:number
The timestamp when the last pinned message was pinned, if there was one
A manager of the messages belonging to this channel
name:string | null
The name of this Group DM Channel
ownerId:Snowflake | null
The user id of the owner of this Group DM Channel
Readonly
partial:false
Whether this Channel is a partial This is always false outside of DM channels.
Inherited from BaseChannel
recipients:PartialRecipient[]
The recipients of this Group DM Channel.
The type of the channel
Readonly
url:string
The URL to the channel
Inherited from BaseChannel
awaitMessageComponent(options?):Promise<MessageComponentInteraction>
Collects a single component interaction that passes the filter. The Promise will reject if the time expires.
Example
// Collect a message component interaction
const filter = (interaction) => interaction.customId === 'button' && interaction.user.id === 'someId';
channel.awaitMessageComponent({ filter, time: 15_000 })
.then(interaction => console.log(`${interaction.customId} was clicked!`))
.catch(console.error);
// Collect a message component interaction
const filter = (interaction) => interaction.customId === 'button' && interaction.user.id === 'someId';
channel.awaitMessageComponent({ filter, time: 15_000 })
.then(interaction => console.log(`${interaction.customId} was clicked!`))
.catch(console.error);
NameTypeOptionalDescription
optionsAwaitMessageComponentOptionsYesOptions to pass to the internal collector
createMessageComponentCollector(options?):InteractionCollector
Creates a component interaction collector.
Example
// Create a button interaction collector
const filter = (interaction) => interaction.customId === 'button' && interaction.user.id === 'someId';
const collector = channel.createMessageComponentCollector({ filter, time: 15_000 });
collector.on('collect', interaction => console.log(`Collected ${interaction.customId}`));
collector.on('end', collected => console.log(`Collected ${collected.size} items`));
// Create a button interaction collector
const filter = (interaction) => interaction.customId === 'button' && interaction.user.id === 'someId';
const collector = channel.createMessageComponentCollector({ filter, time: 15_000 });
collector.on('collect', interaction => console.log(`Collected ${interaction.customId}`));
collector.on('end', collected => console.log(`Collected ${collected.size} items`));
NameTypeOptionalDescription
optionsMessageComponentCollectorOptionsYesOptions to send to the collector
delete():Promise<this>
Deletes this channel.
Example
// Delete the channel
channel.delete()
.then(console.log)
.catch(console.error);
// Delete the channel
channel.delete()
.then(console.log)
.catch(console.error);
Inherited from BaseChannel
fetch(force?):Promise<this>
Fetches this channel.
NameTypeOptionalDescription
forcebooleanYesWhether to skip the cache check and request the API
Inherited from BaseChannel
fetchOwner(options?):Promise<User>
Fetches the owner of this Group DM Channel.
NameTypeOptionalDescription
optionsBaseFetchOptionsYesThe options for fetching the user
iconURL(options?):string | null
The URL to this channel's icon.
Returns
NameTypeOptionalDescription
optionsImageURLOptionsYesOptions for the image URL
Indicates whether this channel is DM-based (either a or a ).
Inherited from BaseChannel
isSendable():this is SendableChannels
Indicates whether this channel is sendable.
Inherited from BaseChannel
isTextBased():this is TextBasedChannel
Indicates whether this channel is text-based.
Inherited from BaseChannel
isThread():this is AnyThreadChannel
Indicates whether this channel is a .
Inherited from BaseChannel
isThreadOnly():this is ThreadOnlyChannel
Indicates whether this channel is .
Inherited from BaseChannel
isVoiceBased():this is VoiceBasedChannel
Indicates whether this channel is .
Inherited from BaseChannel
toJSON(...props):unknown
NameTypeOptionalDescription
...propsRecord<string, boolean | string>[]NoNone
Inherited from Base
toString():ChannelMention
When concatenated with a string, this automatically returns the channel's mention instead of the Channel object.
Example
// Logs: Hello from <#123456789012345678>!
console.log(`Hello from ${channel}!`);
// Logs: Hello from <#123456789012345678>!
console.log(`Hello from ${channel}!`);
valueOf():string