Function: isTextBasedChannel()
isTextBasedChannel(
channel:Nullish|ChannelTypes): channel is DMChannel | PartialDMChannel | NewsChannel | StageChannel | TextChannel | PrivateThreadChannel | PublicThreadChannel<boolean> | VoiceChannel
Checks whether a given channel is a TextBasedChannelTypes. This means it has a send method.
Parameters
| Parameter | Type | Description |
|---|---|---|
channel | Nullish | ChannelTypes | The channel to check. |
Returns
channel is DMChannel | PartialDMChannel | NewsChannel | StageChannel | TextChannel | PrivateThreadChannel | PublicThreadChannel<boolean> | VoiceChannel
Source
projects/utilities/packages/discord.js-utilities/src/lib/type-guards.ts:157