Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/discord.js/src/structures/BaseChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ class BaseChannel extends Base {
return 'bitrate' in this;
}

/**
* Indicates whether this channel is {@link ThreadOnlyChannel thread-only}.
* @returns {boolean}
*/
isThreadOnly() {
return 'availableTags' in this;
}

toJSON(...props) {
return super.toJSON({ createdTimestamp: true }, ...props);
}
Expand Down
1 change: 1 addition & 0 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,7 @@ export abstract class BaseChannel extends Base {
public isTextBased(): this is TextBasedChannel;
public isDMBased(): this is PartialGroupDMChannel | DMChannel | PartialDMChannel;
public isVoiceBased(): this is VoiceBasedChannel;
public isThreadOnly(): this is ThreadOnlyChannel;
public toString(): ChannelMention | UserMention;
}

Expand Down