Skip to main content

Function: isGuildBasedChannelByGuildKey()

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

Checks whether or not a channel comes from a guild.

Parameters

ParameterTypeDescription
channelNullish | ChannelTypesThe channel to check.

Returns

channel is GuildTextBasedChannelTypes

Whether or not the channel is guild-based.

Remark

As opposed to isGuildBasedChannel this checks if there is guild property on the channel.

Defined in

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