Emitter
An emitter that can be used to emit events, this class will be used to push updates from the Discord Websockets out to the Consumers of this library.
Properties
The Emitter instance has no set properties!
Methods
The Emitter instance has no set methods!
Functions
listen
Listen to this event, returns a function that can be called to disconnect the listener
listenOnce
Listen to this event once, this will automatically disconnect after the first invocation
wait
Wait for this event to be emitted from, returns the result of the emittion
invoke
Responsible for invoking all the threads that are listening to this emitter.
This will additionally resume all the threads that are currently waiting for an event to be emitted.
new
Emitter . new () -> ()
Constructor for the Emitter object, will return a new instance of the Emitter object.