RaidWatch 2

API / Comm

Parameters in red are optional.

plugin:RegisterListener(module, listener)

Register a message to listen for.


  • module (table) The module that want to listen to the message.
  • listener (string) A function with this name must exist on the module object, or the module must have an OnSync function that takes looks like func(listener, sender, dist, ...).

plugin:Send(comMsg, dist, target, ...)

Send a message over the addon communication channel


  • comMsg (string) The string that ideintifies the message.
  • dist (string) The distrubution to use (GUILD, RAID, WHISPER etc.)
  • target (string) The target to send the message to, only used when the dist is WHISPER.
  • ... (data) Any kind of data to send along with the message.


Unregister all listening messages for a module.


  • module (table) The module that wants all messages unregistered.

plugin:UnregisterListener(module, listener)

Unregister a listening message for a module.


  • module (table) The module that wants to unregister for a message.
  • listener (string) The message to stop listening for.

You must login to post a comment. Don't have an account? Register to get one!