Component
Abstract class which implements Node.js EventEmitter class,
but provides only on
, once
, emit
functions.
constructor(bot)
​
added in 1.0.0 methods​
on(event, callback)
​
added in 1.0.0 once(event, callback)
​
added in 1.0.0emit(event, [...args])
​
added in 1.0.0event
- <string>. Event name.args
- <Array>. Emit arguments, this args will comes tocallback
function foron
andonce
event subscription.
cleanup([event])
​
added in 1.0.0Cleanup event or all events.
event
- <Object>. Event class. which has been remove listeners. Ifevent
parameter is not provided - function remove all listeners from all events.