Skip to main content

Function: isDMChannel()

isDMChannel(channel: Nullish | ChannelTypes): channel is DMChannel | PartialDMChannel

Checks whether a given channel is a DMChannel This checks for ChannelType.DM.

Parameters​

ParameterTypeDescription
channelNullish | ChannelTypesThe channel to check

Returns​

channel is DMChannel | PartialDMChannel

Defined in​

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