WoW:API UnitIsAFK: Difference between revisions

Updated to match the current API boilerplate.
mNo edit summary
(Updated to match the current API boilerplate.)
Line 1: Line 1:
{{Stub/API}}
{{wowapi}} __NOTOC__
{{wowapi}}
 
== Parameters ==
 
Checks if a unit is AFK.
isAFK = UnitIsAFK([[UnitId|unitId]])
 
 
=== Arguments ===
=== Arguments ===
:;unitId : The [[UnitId]] to check


:;unitName : The [[API TYPE UnitId|Unit id]] you want debuff information for.


=== Returns ===
=== Returns ===
:; isAFK : [[Boolean]] - Whether the unit is AFK


:;afk


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


<pre> afk = UnitIsAFK("player"); </pre>
<big>'''Results'''</big>


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