Skip to main content

Function: isGuildMember()

isGuildMember(member: APIGuildMember | APIInteractionGuildMember | APIInteractionDataResolvedGuildMember | GuildMember | Nullish): member is GuildMember

Checks whether a given member is an instance of GuildMember, and not APIInteractionGuildMember, APIGuildMember, or Nullish

Parameters

ParameterTypeDescription
memberAPIGuildMember | APIInteractionGuildMember | APIInteractionDataResolvedGuildMember | GuildMember | NullishThe member to check

Returns

member is GuildMember

true if the member is an instance of GuildMember, false otherwise.

Source

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