WoW API: UnitIsDND

From AddOn Studio
Revision as of 04:47, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API UnitIsDND to API UnitIsDND without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < UnitIsDND

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

isDND = UnitIsDND("unit")

Arguments[edit]

unit
The UnitId to return DND status of.

Returns[edit]

isDND
1 if unit is DND, nil otherwise.

Example[edit]

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