INNER CODE UNIT · JavaScript

Promise

csfloat/inspect · lib/bot.js:232

        return new Promise((resolve, reject) => {
            this.resolve = resolve;
            this.busy = true;

            const params = link.getParams();
            winston.debug(`${this.username} Fetching for ${params.a}`);

            this.currentRequest = {s: params.s, a: params.a, d: params.d, m: params.m, time: new Date().getTime()};

            if (!this.ready) {
                reject('This bot is not ready');
            }
            else {
                // The first param (owner) depends on the type of inspect link
                this.csgoClient.inspectItem(params.s !== '0' ? params.s : params.m, params.a, params.d);
            }

            // Set a timeout in case the GC takes too long to respond

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…