V
V
Vyacheslav14102021-01-15 11:44:55
Node.js
Vyacheslav1410, 2021-01-15 11:44:55

Why is the callback button not working?

I built the right keyboard

const { VK, Keyboard} = require('vk-io');
const vk = new VK({token:string,
pollingGroupId:number,
});
const { api } = vk;
 api.messages.send({
    message:"hi",
    user_id:number,
    keyboard: Keyboard.builder().callbackButton({
        label:"coffe",
        payload:{
            command:'something',
            item:'something'
        },
        color:'positive'
    }).inline(true),
    random_id:92037
 })

 vk.updates.on('message_event', async (ctx) =>{
    console.log(ctx)
   
});

When I press the button, nothing happens, I do not understand what's wrong.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question