Answer the question
In order to leave comments, you need to log in
How to make a keyboard sent to another user inline?
I have a bot that sends a keyboard with a message to another user. How to make it inline? Tried everything, gives an error. Here is the code:
await vk.api.messages.send({
user_id: id,
message: `text`,
keyboard:
keyboard = Keyboard.keyboard()
})
});
Answer the question
In order to leave comments, you need to log in
I take it you are using the "vk-io" module?
I didn't change much of your code:
const { VK, Keyboard } = require('vk-io');
await vk.api.messages.send({
user_id: id,
message: `text`,
keyboard: Keyboard.builder()
.textButton({ label: "Текст", payload: {}, color: Keyboard.SECONDARY_COLOR
.inline(true)
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question