Botman: Are Telegram Inline keyboards implemented in conversations?

Created on 2 Mar 2017  Â·  4Comments  Â·  Source: botman/botman

I would like to use them in a Conversation, but couldn`t find how to do it.
At the moment im using addButton but its placing each button in a new row.

image

This is what I have now

Most helpful comment

$keyboard = [
            ['300 €', '400 €', '450 €'],
            ['500 €', '600 €', '700 €'],
            ['800 €', '900 €', '1000 €'],
            ['1200 €', '1400 €', '2000 €'],
            ['2500 €', '3000 €', 'any'],
        ];
        $this->ask('How much?',
            function (Answer $answer) {
                $this->askAdress();
            }, ['reply_markup' => json_encode([
                'keyboard' => $keyboard,
                'one_time_keyboard' => true,
                'resize_keyboard' => true
            ])]
        );

All 4 comments

Yes they are :P

image

Passing buttons manually as extra parameters instead of using ->addButtons
Worked.

Oh cool. Do you mind sharing the code?

$keyboard = [
            ['300 €', '400 €', '450 €'],
            ['500 €', '600 €', '700 €'],
            ['800 €', '900 €', '1000 €'],
            ['1200 €', '1400 €', '2000 €'],
            ['2500 €', '3000 €', 'any'],
        ];
        $this->ask('How much?',
            function (Answer $answer) {
                $this->askAdress();
            }, ['reply_markup' => json_encode([
                'keyboard' => $keyboard,
                'one_time_keyboard' => true,
                'resize_keyboard' => true
            ])]
        );
Was this page helpful?
0 / 5 - 0 ratings

Related issues

kubk picture kubk  Â·  4Comments

lostertschnig picture lostertschnig  Â·  3Comments

s4rrow picture s4rrow  Â·  5Comments

iNilo picture iNilo  Â·  3Comments

antonkomarev picture antonkomarev  Â·  5Comments