P
P
PegasusPega2020-07-14 01:21:33
Node.js
PegasusPega, 2020-07-14 01:21:33

Rows is not defined?

const {VK, Keyboard } = require('vk-io');
Keyboard.keyboard(rows, options); // => KeyboardBuilder
[
    Keyboard.textButton({
      label: 'Buy a tea',
      payload: {
        command: 'buy',
        item: 'tea'
      },
      color: Keyboard.POSITIVE_COLOR
    }),
    Keyboard.textButton({
      label: 'Buy a coffee',
      payload: {
        command: 'buy',
        item: 'coffee'
      },
      color: Keyboard.POSITIVE_COLOR
    })
  ],

Rows is not defined error. How to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Loli E1ON, 2020-07-14
@PegasusPega

https://github.com/negezor/vk-io/blob/master/docs/...

Keyboard.keyboard([
  // Одна кнопка
  [
    Keyboard.textButton({
      label: 'Go back',
      payload: {
        command: 'back'
      }
    })
  ],
]);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question