Size: a a a

2017 August 21

NK

ID:439728014 in Dev Chat
@bitrixhater what I mean, is when an inline menu button is pressed, it should send an appropriate slash command to my bot
источник

NK

ID:439728014 in Dev Chat
I can't seem to get that to work
источник

1

1C-Bitrix in Dev Chat
I thought about keyboard menu
источник

1

1C-Bitrix in Dev Chat
Never works with inline menu
источник

1

1C-Bitrix in Dev Chat
Idk
источник

NK

ID:439728014 in Dev Chat
but the telegram-node-bot library doesn't have keyboard menus?
источник

1

1C-Bitrix in Dev Chat
It has
источник

1

1C-Bitrix in Dev Chat
Check runMenu command
источник

NK

ID:439728014 in Dev Chat
ok, that one that shows below the chat box right?
источник

1

1C-Bitrix in Dev Chat
Yes, like this
источник

1

1C-Bitrix in Dev Chat
источник

NK

ID:439728014 in Dev Chat
yeah, so how do i make the buttons clicked send a slash command to my bot?
источник

NK

ID:439728014 in Dev Chat
the docs doesn't show that pls
источник

NK

ID:439728014 in Dev Chat
what I mean is, when I click on one of the buttons like you showed in the picture, it should run the code in one of my controllers
источник

NK

ID:439728014 in Dev Chat
how do I direct the router to that handler, or how do I send an appropiate slash command to my bot when a button is pressed
источник

1

1C-Bitrix in Dev Chat
You just can do
myControllerInstance.commandHandler($)
источник

NK

ID:439728014 in Dev Chat
like new HelloWorldController().commandHandler($) ??
источник

1

1C-Bitrix in Dev Chat
You don't need to create new instance of your controller every time when you have to call it's method
источник

1

1C-Bitrix in Dev Chat
Just create instance once before you defining routes
источник

1

1C-Bitrix in Dev Chat
You can try to find examples in my kbpbot
https://github.com/bitrixhater/kbpbot
источник