src/Core/Command/CommandCooldown.js
/**
     * Checks the command cooldown of the user
     *
     * @param {String} userID - The userID
     * @returns {[Number, Boolean]} Empty array if no cooldowns / Array with the time left and whether we should send a cooldown message or not
     *
     * @memberof CommandCooldown
     */
Checks the command cooldown of the user
@param {String} userID - The userID
@returns {[Number, Boolean]} Empty array if no cooldowns / Array with the time left and whether we should send a cooldown message or not


Checks the command cooldown of the user @param { String } userID - The userID @returns { [ Number Boolean ] } Empty array if no cooldowns / Array with the time left and whether we should send a cooldown message or not
shouldCooldown(userID) {
        const cooldown = this._cooldowns.get(userID);
        if (!cooldown) {
            return []; 
        }
        const timeLeft = Date.now() - cooldown.time;
        if (timeLeft <= this.cooldown) {
            return [timeLeft, this.shouldSendCooldownMessage(cooldown)]; 
        }
        this._cooldowns.delete(userID);
        return []; 
    }
shouldCooldown ( userID ) { const cooldown = this . _cooldowns . get ( userID ) ; if ( ! cooldown ) { return [ ] ; } const timeLeft = Date . now ( ) - cooldown . time ; if ( timeLeft <= this . cooldown ) { return [ timeLeft , this . shouldSendCooldownMessage ( cooldown ) ] ; } this . _cooldowns . delete ( userID ) ; return [ ] ; }
Checks the command cooldown of the user
 @param {String} userID - The userID
 @returns {[Number, Boolean]} Empty array if no cooldowns / Array with the time left and whether we should send a cooldown message or not
Checks the command cooldown of the user @param { String } userID - The userID @returns { [ Number Boolean ] } Empty array if no cooldowns / Array with the time left and whether we should send a cooldown message or not
// No cooldown registered yet // Doesn't cooldown // Time spent since last uses <= cooldown chose for that command // Return [time left, should send a cooldown message] // Delete current time for this user. // Doesn't cooldown