INNER CODE UNIT · JavaScript
Bot
csfloat/inspect · lib/bot.js:7
class Bot extends EventEmitter {
/**
* Sets the ready status and sends a 'ready' or 'unready' event if it has changed
* @param {*|boolean} val New ready status
*/
set ready(val) {
const prev = this.ready;
this.ready_ = val;
if (val !== prev) {
this.emit(val ? 'ready' : 'unready');
}
}
/**
* Returns the current ready status
* @return {*|boolean} Ready status
*/