Skip to main content

Function: isGuildBasedChannel()

isGuildBasedChannel(channel: Nullish | ChannelTypes): channel is GuildTextBasedChannelTypes

Checks if a channel comes from a guild. This checks that the channel is not ChannelType.DM.

Parameters

ParameterTypeDescription
channelNullish | ChannelTypesThe channel to check

Returns

channel is GuildTextBasedChannelTypes

Whether or not the channel is guild-based.

Defined in

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