Skip to main content

Function: isTextChannel()

isTextChannel(channel: Nullish | ChannelTypes): channel is TextChannel

Checks whether a given channel is a TextChannel. This checks for ChannelType.GuildText.

Parameters

ParameterTypeDescription
channelNullish | ChannelTypesThe channel to check.

Returns

channel is TextChannel

Source

projects/utilities/packages/discord.js-utilities/src/lib/type-guards.ts:95