I'm trying to locate a way to find out what type of mechanic a debuff has. For example: Mage improved counterspell has a silence mechanic. Rogue cheap shot has a stun mechanic. Is there a way to find out what the name of the mechanic is in Blizz's UI? I know blizzard does it, because when you try to cast something, it will give you a message saying "You cannot do that while silenced", etc.
I think that what Blizzard does there is under the layer of the API available to addons. Blizzard pops error events when you can't cast a spell and transmits them to the API only when they already decided if you were stunned, silenced or whatever.
I guess that the choices that you have are either to parse tooltips and check if you can see keywords in them (wide but not sure approach) or to use a big table to relate spells and their effects.
How would you go about parsing the tooltips? I kind of looked at that as an option last night, but I also couldn't find an API function that would allow me to pull the tooltip. I found out how to get the name and a bunch of other things, but the tooltip wasn't in there.