src/Core/Event/EventManager.js
/**
     * Register a handler.
     * Remove the current event listener if the handler already exists.
     * Create a new handler from the array of listeners for the given event.
     *
     * @param {String} event - The Discord event name
     * @returns {AHandler} The new Handler created
     * @memberof EventManager
     */
Register a handler.
Remove the current event listener if the handler already exists.
Create a new handler from the array of listeners for the given event.

@param {String} event - The Discord event name
@returns {AHandler} The new Handler created
@memberof EventManager
Register a handler . Remove the current event listener if the handler already exists . Create a new handler from the array of listeners for the given event . @param { String } event - The Discord event name @returns { AHandler } The new Handler created @memberof EventManager
registerHandler(event) {
        const HandlerClass = this.HANDLERS[event];
        if (!HandlerClass) {
            this.logger.error(`EventManager: Event ${event} is not a valid event name!`);
            return null;
        }
        let handler = this._handlers.get(event);
        if (handler) {
            this.bot.off(event, handler._handle);
        }
        handler = new HandlerClass(this.axon, event, this._events[event] );
        this._handlers.set(event, handler);
        return handler;
    }
registerHandler ( event ) { const HandlerClass = this . HANDLERS [ event ] ; if ( ! HandlerClass ) { this . logger . error ( ` ${ event } ` ) ; return null ; } let handler = this . _handlers . get ( event ) ; if ( handler ) { this . bot . off ( event , handler . _handle ) ; } handler = new HandlerClass ( this . axon , event , this . _events [ event ] ) ; this . _handlers . set ( event , handler ) ; return handler ; }
Register a handler.
Register a handler .
/* Remove the current event if any registered */