WoW API: UnitIsAFK

From AddOn Studio
Revision as of 18:39, 25 June 2007 by WoWWiki>Ravas (Updated to match the current API boilerplate.)
Jump to navigation Jump to search

WoW API < UnitIsAFK


Checks if a unit is AFK.

isAFK = UnitIsAFK(unitId)


Arguments

unitId
The UnitId to check


Returns

isAFK
Boolean - Whether the unit is AFK


Example

afk = UnitIsAFK("player");
if afk then
  DEFAULT_CHAT_FRAME:AddMessage("You are AFK");
end

Results

If the player is AFK, it outputs "You are AFK" to the default chat window.