The WorldStateFrame was removed, so GetNumWorldStateUI no longer exists. All extra info frames, such as capture bars under the minimap, world pvp zones, battleground information, and so on was consolidated into a central UIWidgetManager. However, you should just check if you're in a raid to use the RAID channel. Using that macro in an area with an active widget while not in a raid will give a chat message saying you're not in a raid.
/run SendChatMessage(string.format("{Triangle} %s {Triangle} - CLEAR",GetMinimapZoneText()),select(2,GetInstanceInfo())=="pvp" and "BATTLEGROUND" or IsInRaid() and "RAID" or "YELL")
|