Skip to content

Как обрабатывать нажатие на кнопки? #114

@Jonston

Description

@Jonston

К примеру есть 2 кнопки

            $buttonConfirm->setActionType('reply');
            $buttonConfirm->setActionBody('confirm');
            $buttonConfirm->setText('Подтвердить');

            $buttonCancel = new KeyboardButton();
            $buttonCancel->setActionType('reply');
            $buttonCancel->setActionBody('cancel');
            $buttonCancel->setText('Отклонить');

            $keyboard = new Keyboard();
            $keyboard->setButtons([$buttonConfirm, $buttonCancel]);

Как обработать их нажатие и еще как пользоваться методом $bot->on ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions