Skip to main content

Function: isTextBasedChannel()

isTextBasedChannel(channel: Nullish | ChannelTypes): channel is DMChannel | PartialDMChannel | NewsChannel | TextChannel | PublicThreadChannel | PrivateThreadChannel | VoiceChannel

Defined in: projects/utilities/packages/discord.js-utilities/src/lib/type-guards.ts:158

Checks whether a given channel is a TextBasedChannelTypes. This means it has a send method.

Parameters

ParameterTypeDescription
channelNullish | ChannelTypesThe channel to check.

Returns

channel is DMChannel | PartialDMChannel | NewsChannel | TextChannel | PublicThreadChannel | PrivateThreadChannel | VoiceChannel