Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard #6

Closed
beneyraheem opened this issue Aug 16, 2017 · 4 comments
Closed

Keyboard #6

beneyraheem opened this issue Aug 16, 2017 · 4 comments
Labels

Comments

@beneyraheem
Copy link

Is it possible to repeat a keyboard without writing whole setKeyboard in each.

like

$menu = new Keyboard

and repeat by calling setKeyboard($menu)

@Bogdaan
Copy link
Owner

Bogdaan commented Aug 16, 2017

yes of course

@beneyraheem
Copy link
Author

$menu = new Keyboard (
(new \Viber\Api\Keyboard())
->setButtons([
(new \Viber\Api\Keyboard\Button())
->setActionType('reply')
->setActionBody('menu')
->setText('Main Menu')
]));

Can you fix this code for me please.

@Bogdaan
Copy link
Owner

Bogdaan commented Aug 16, 2017

$menu = (new \Viber\Api\Keyboard())
->setButtons([
  (new \Viber\Api\Keyboard\Button())
  ->setActionType('reply')
  ->setActionBody('menu')
  ->setText('Main Menu')
]);

@Bogdaan Bogdaan closed this as completed Aug 16, 2017
@beneyraheem
Copy link
Author

great, Thanks a lot for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants