m
Move page script moved page API UnitIsAFK to WoW:API UnitIsAFK without leaving a redirect
(Updated to match the current API boilerplate.) |
m (Move page script moved page API UnitIsAFK to WoW:API UnitIsAFK without leaving a redirect) |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ | {{wowapi}} __NOTOC__ | ||
Checks if a unit is AFK. | Checks if a unit is AFK. | ||
isAFK = UnitIsAFK( | isAFK = UnitIsAFK("unit") | ||
=== Arguments === | === Arguments === | ||
;unit : The [[UnitId]] to return AFK status of. | |||
=== Returns === | === Returns === | ||
; isAFK | |||
: true if unit is AFK, false otherwise. | |||
== Example == | == Example == | ||
If the player is AFK, the following script outputs "You are AFK" to the default chat window. | |||
if UnitIsAFK("player") then | |||
DEFAULT_CHAT_FRAME:AddMessage("You are AFK"); | DEFAULT_CHAT_FRAME:AddMessage("You are AFK"); | ||
end | end | ||