const express = require('express');
const bodyParser = require('body-parser');
const { Bot } = require('..');
const bot = new Bot({
  token: 'Community API token',
  group_id: 123456
});

const port = 8000;
const app = express();

app.use(bodyParser.json());

app.post('/bot', (req, res) => {
  if (req.body.type == 'confirmation') return res.send('CONFIRMATION CODE');
  bot.processUpdate(req.body);
  res.sendStatus(200);
});

app.listen(port, () => {
  console.log(`Express server is listening on ${port}`);
});

bot.get(/Hi|Hello|Hey/i, message => {
  bot.send('Hello!', message.peer_id, {
    keyboard: JSON.stringify({
      one_time: true,
      buttons: [
        {
          action: {
            type: 'text',
            label: 'Red'
          },
          color: 'negative'
        },
        {
          action: {
            type: 'text',
            label: 'Green'
          },
          color: 'positive'
        },
      ]
    })
  });
});

bot.get(/Red|Green/, msg => bot.send('You clicked a button - ' + msg.body, msg.peer_id))
@@ -68,24 +68,25 @@
 y-parser');%0A
+%0A
 const %7B Bot 
@@ -84,16 +84,41 @@
 st %7B Bot
+, Keyboard, KeyboardColor
  %7D = req
@@ -579,404 +579,186 @@
 %7B%0A  
-bot.send('Hello!', message.peer_id, %7B%0A    keyboard: JSON.stringify(%7B%0A      one_time: 
+const keyboard = new Keyboard(
 true
-,
+)
 %0A    
-  buttons: %5B%0A        %7B%0A          action: %7B%0A            type: 'text',%0A            label: 'Red'%0A          %7D,%0A          color: 'negative'%0A        %7D,%0A        %7B%0A          action: %7B%0A            type: 'text',%0A            label: 'Green'%0A          %7D,%0A          color: 'positive'%0A        %7D,%0A      %5D%0A    %7D)%0A  %7D);
+.addButton('Red', KeyboardColor.NEGATIVE)%0A    .addButton('Green', KeyboardColor.POSITIVE)%0A%0A  bot.send('Hello!', message.peer_id, keyboard)
 %0A%7D);

Update keyboards example