skip to Main Content

A message is displayed without an inline keyboard. I didn’t notice any syntax errors, and I couldn’t find anything on the Internet.

function addDescription(ctx) {
    const keyboard = Markup.inlineKeyboard([
        [Markup.button.callback('❌ Пропустить', 'noDescription')],
    ]);

    ctx.reply("Теперь добавьте описание к фотографии", { reply_markup: keyboard, parse_mode: 'Markdown' });
}

2

Answers


  1. To address your issue, it’s important to understand the format in which you need to send keyboard data. Could you specify which library you are using?

    One potential solution is to try sending a keyboard message without using any library, as the format of the keyboard array might differ from the one used in libraries. For instance, if you consider a simple keyboard, the array structure upon sending looks like this:

       var keybd = [false, [
            [
                ['text' => 'button 1'],
                ['text' => 'button 2'],
            ],
            [
                ['text' => 'button 3'],
                ['text' => 'button 4'],
            ],
        ]]; 
    

    Remember, the exact format may vary based on the library or framework you’re using, so knowing that will help in providing a more precise solution.

    Login or Signup to reply.
  2. Try changing the reply method as showed in this example:

    ctx.reply(
        "random example",
        Markup.inlineKeyboard([
            Markup.button.callback("Coke", "Coke"),
            Markup.button.callback("Dr Pepper", "Dr Pepper", Math.random() > 0.5),
            Markup.button.callback("Pepsi", "Pepsi"),
        ]),
    );
    

    Maybe just sending back keyboard will be enough

    Also, check this source for more examples

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search