‚̧Nonstop Perpetual Motion
    Wondering what‚Äôs next for npm?Check out our public roadmap! ¬Ľ

    teabot-aerospike

    1.0.0¬†‚Äʬ†Public¬†‚Äʬ†Published

    teabot-aerospike License npm npm

    Build Status node Test Coverage bitHound Score

    teabot-aerospike an Aerospike db plugin for TeaBot.

    By default, all data is stored in memory, but for synchronization between servers or nodes, you can use this plugin.

    Usage

    $ npm install teabot-aerospike --save

    You also should install TeaBot and Aerospike client.

    var TeaBot = require('teabot')('TELEGRAM_BOT_TOKEN', 'TELEGRAM_BOT_NAME');
    var aerospike = require('aerospike');
    var client = aerospike.client({
      hosts: [{
        addr: '127.0.0.1',
        port: 4000,
      }]
    }).connect(function(response) {
      if (response.code == 0) {
        console.log('Connection to Aerospike cluster succeeded!');
      }
    });
     
    TeaBot.use('db', require('teabot-aerospike')(client));
     
    TeaBot.defineCommand(function(dialog, message) {
      dialog.setUserData('some data', 'data'); // data will be stored at Aerospike db
      dialog.sendMessage('Echo: ' + message.text);
    });
     
    TeaBot.startPolling();

    License

    The MIT License (MIT)
    Copyright (c) 2016 Alexey Bystrov

    Install

    npm i teabot-aerospike

    DownloadsWeekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • avatar