Is there a way to stop listening to an event set with the 'on' function?
Robin K. said: Is there a way to stop listening to an event set with the 'on' function? Not as far as I'm aware, but you can certainly find a workaround for whatever your use case is, e.g. setting some variable to make the callback function do nothing.
You should be able to set up a chat command to switch the listener on and off, perhaps with a boolean stored in the state. Then in the on event, have an if statement wrapping your actual process code so that it doesnt actually do anything if the boolean is false. Edit: Ninja'd by Jakob, only by 11 hours...
Thank you for the replies guys! I take a look in to this.