WoW:API UnitIsDND: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Initial creation)
 
m (Move page script moved page API UnitIsDND to API UnitIsDND without leaving a redirect)
 
(No difference)

Latest revision as of 04:47, 15 August 2023

WoW API < UnitIsDND

Checks if a unit is DND (Do Not Disturb).

isDND = UnitIsDND("unit")

Arguments

unit
The UnitId to return DND status of.

Returns

isDND
1 if unit is DND, nil otherwise.

Example

If the player is DND, the following script outputs "You are DND" to the default chat window.

if UnitIsDND("player") then
  DEFAULT_CHAT_FRAME:AddMessage("You are DND");
end