2020-05-29 08:49:31 +02:00
parent 0268357929
commit 67218eb4e9

14
unlisten.md Normal file

@ -0,0 +1,14 @@
unlisten(messageName, *bundleName, handlerFunc) → {boolean}
Removes a listener for a message.
Messages are namespaced by bundle. To remove a listener to a message in another bundle's namespace, provide it as the second argument.
#Parameters
Name Type Attributes Default Description
messageName string The name of the message.
bundleName string <optional> CURR_BNDL The bundle namespace to in which to listen for this message
handlerFunc function A reference to a handler function added as a listener to this message via listenFor.
#Example
nodecg.unlisten('printMessage', someFunctionName);
Removing a listener from a message in another bundle's namespace:
nodecg.unlisten('printMessage', 'another-bundle', someFunctionName);