Returns whether the player is currently in the specified type of group, or any type of group if not specified.


See also Party functions, Raid functions.

Signature:

inGroup = IsInGroup([groupType])

Arguments:

  • groupType - Group type to check for (one of the below constants), checks for all types if not specified (number)
    • LE_PARTY_CATEGORY_HOME - Checks for home-realm parties
    • LE_PARTY_CATEGORY_INSTANCE - Checks for instance-specific groups

Returns:

  • inGroup - True if in the specified type of group (or any if groupType was not specified), false otherwise (boolean)

Examples:

local inInstanceGroup = IsInGroup(LE_PARTY_CATEGORY_INSTANCE)
if inInstanceGroup then
  print("Player is in an instance group!")
elseif IsInGroup() then
  print("Player is in a normal group!")
end