src/Core/Event/EventManager.js
/**
     * Register a listener for the given discord event.
     * Add the Listener in the array of Listener for each discord event.
     * Called by ModuleLoader when registering an event.
     *
     * @param {Listener} listener - The Listener Object
     * @returns {Array<Listener>} Array of the functions bound to the event
     *
     * @memberof EventManager
     */
Register a listener for the given discord event.
Add the Listener in the array of Listener for each discord event.
Called by ModuleLoader when registering an event.

@param {Listener} listener - The Listener Object
@returns {Array} Array of the functions bound to the event


Register a listener for the given discord event . Add the Listener in the array of Listener for each discord event . Called by ModuleLoader when registering an event . @param { Listener } listener - The Listener Object @returns { Array } Array of the functions bound to the event
registerListener(listener) {
        if (!listener.load) {
            return null;
        }
        this._events[listener.eventName] = this._events[listener.eventName] || [];
        const index = this._events[listener.eventName].findIndex(l => l.label === listener.label);
        if (index > -1) {
            this._events[listener.eventName].splice(index, 1);
        }
        this._events[listener.eventName].push(listener);
        return this._events[listener.eventName];
    }
registerListener ( listener ) { if ( ! listener . load ) { return null ; } this . _events [ listener . eventName ] = this . _events [ listener . eventName ] || [ ] ; const index = this . _events [ listener . eventName ] . findIndex ( l => l . label === listener . label ) ; if ( index > - 1 ) { this . _events [ listener . eventName ] . splice ( index , 1 ) ; } this . _events [ listener . eventName ] . push ( listener ) ; return this . _events [ listener . eventName ] ; }
Register a listener for the given discord event.
Register a listener for the given discord event .
/* Doesn't load the listener */ // Remove/replace if already existing // Add Listener