lib/index.js
/**
     * Create a bot. Note you can't do much too exciting with your bot after you instantiate it; you have to initialize it first.
     * @memberof Bot
     * @example
     * const bot = new Bot()
     */
Create a bot. Note you can't do much too exciting with your bot after you instantiate it; you have to initialize it first.
@memberof Bot
@example
const bot = new Bot()
Create a bot . Note you can ' t do much too exciting with your bot after you instantiate it ; you have to initialize it first . @memberof Bot @example const bot = new Bot ()
function Bot(opts) {
        var _a, _b;
        var debugLogging = (_b = (_a = opts) === null || _a === void 0 ? void 0 : _a.debugLogging, (_b !== null && _b !== void 0 ? _b : defaultOpts.debugLogging));
        this._botId = crypto_1.default.randomBytes(16).toString('hex');
        this._workingDir = path_1.default.join(os_1.default.tmpdir(), "keybase_bot_" + this._botId);
        this._adminDebugLogger = new adminDebugLogger_1.AdminDebugLogger(this._botId);
        this._service = new service_1.default(this._workingDir, this._adminDebugLogger, (debugLogging !== null && debugLogging !== void 0 ? debugLogging : false));
        this.chat = new chat_client_1.default(this._workingDir, this._adminDebugLogger);
        this.wallet = new wallet_client_1.default(this._workingDir, this._adminDebugLogger);
        this.team = new team_client_1.default(this._workingDir, this._adminDebugLogger);
        this.helpers = new helpers_client_1.default(this._workingDir, this._adminDebugLogger);
        this.kvstore = new kvstore_client_1.default(this._workingDir, this._adminDebugLogger);
        this._initStatus = 'preinit';
    }
function Bot ( opts ) { var _a , _b ; var debugLogging = ( _b = ( _a = opts ) === null || _a === void 0 ? void 0 : _a . debugLogging , ( _b !== null && _b !== void 0 ? _b : defaultOpts . debugLogging ) ) ; this . _botId = crypto_1 . default . randomBytes ( 16 ) . toString ( 'hex' ) ; this . _workingDir = path_1 . default . join ( os_1 . default . tmpdir ( ) , "keybase_bot_" + this . _botId ) ; this . _adminDebugLogger = new adminDebugLogger_1 . AdminDebugLogger ( this . _botId ) ; this . _service = new service_1 . default ( this . _workingDir , this . _adminDebugLogger , ( debugLogging !== null && debugLogging !== void 0 ? debugLogging : false ) ) ; this . chat = new chat_client_1 . default ( this . _workingDir , this . _adminDebugLogger ) ; this . wallet = new wallet_client_1 . default ( this . _workingDir , this . _adminDebugLogger ) ; this . team = new team_client_1 . default ( this . _workingDir , this . _adminDebugLogger ) ; this . helpers = new helpers_client_1 . default ( this . _workingDir , this . _adminDebugLogger ) ; this . kvstore = new kvstore_client_1 . default ( this . _workingDir , this . _adminDebugLogger ) ; this . _initStatus = 'preinit' ; }
Create a bot.
Create a bot .