How can create menu for telegram bot in bot father? - webhooks

I'm new in telegram bot and see this bot:
that but when type /start show menu to me and with out type slash to command just fire the menu button,how can i create menu in telegram like that bot?

You must add the return ajax call a string like this:
'{ "keyboard": [["uno :+1:"],["uno \ud83d\udc4d", "due"],["uno", "due","tre"],["uno", "due","tre","quattro"]]}';
The result is:

Related

Python Telethon

I've been searching through the python telethon docs and didn't find a solution. I need to create a function which will:
Send message (red), then the bot will send a message with inline buttons (i know how to click on them)
I will click on first inline button (green), the bot will send another message with 2 inline buttons. I need to get link from message and then click on first inline button
What should I use and how?

Carousel item invoking another intent (not the followup actions_intent_option)

I need some help here. I have a google assistant food recipes bot with the following intents:
[GET_RECIPES_BY_NAME]
[GET_RECIPES_BY_CAROUSEL]
-----[GET_OPTION]
So, when the user says "I want a chocolate cake", the dialogflow invokes the [GET_RECIPES_BY_NAME].
When user says "See menu", the bot shows the carousel. But, when the user taps the item, the dialogflow is invoking the [GET_RECIPES_BY_NAME] too, not the [GET_OPTION].
It is using/returning the title instead of the option/key.
[GET_OPTION] intent was set as followup with the context and event actions_intent_OPTION.
The flow is a little bit more complex, but I revised it to make it more comprehensible. All the intents handles are in the fulfillment.
I tried many solutions: [GET_OPTION] as followup, as in the first level, deleting and recreating all the contexts in fulfillment....and so on, and nothing.
An important detail: recipes that don't not have the training in [GET_RECIPES_BY_NAME] call correctly in the [GET_OPTION].
My question is this: If I set any followup intent and set it with the event actions_intent_OPTION, shouldn't this always be invoked when I tap the carousel item?

Is there any way to have button in chat-bot created using Python, Flask, Chatterbot?

I have tried to create chatbot using Python with Flask framework and Chatterbot module. Since We are training data from YAML file, GUI programming to get answers it bit confusing. I want to get button for some of Bot response when user clicks on particular button, bot should reply accordingly.
For Example -
Human - search some music.
Bot - What kind of Music you like.?
(Button 1 - Rock) (Button 2 - Classic) (Button 3- Pop)
(When user clicks on any of button, but should answer like that way. If user clicks on Pop)
Human - Pop
Bot - great, searching Pop music for you.!
Is there any way to structure YAML file for button.? Or any other way.?

Select intent not triggered if selection is not immediately followed by carousel

I am facing a problem with listening to User Selection when we show a carousel. We are using askWithCarousel with dialogFlow and listening to click of a carousel item using actions_intent_option event. When a carousel is displayed to user, assistant starts listening to user input using mic, if mic gets a random input from user (which doesn’t match any of our synonyms for the carousel items) and then the user taps on any carousel item or says any of the synonyms, actions_intent_option event is not getting fired. It works fine if this interaction is immediately followed by showing of carousel. Else, it will take carousel title as user input and resolves to a different intent.
Not able to get the id of the carousel item because of this. Is there a way to disable mic or emit actions_intent_option even when the user clicks on carousel item later. Please help with this flow.
Selection events are only emitted, as you've discovered, right after the carousel or list has been sent to the user.
I'd recommend setting up a fallback intent to check for the titles of the list items or prompting the user with a carousel or list again.

MS Bot Framework: Begin Dialog When User Taps on Hero Card

I'm having a Hero Card, which opens an URL when a users taps on it:
const message = new builder.Message(session);
message.attachmentLayout(builder.AttachmentLayout.carousel);
message.addAttachment(
new builder.HeroCard(session)
.title('Title')
.tap(builder.CardAction.openUrl(session, 'https://www.google.com'))
.images([builder.CardImage.create(session, url)]));
How can I change the tap() action so that instead of opening an URL a certain dialog is started? (Like I would do with session.beginDialog('DialogID');)?
Change the openUrl to either imBack (if you want the user to see the message sent to the bot) or postBack (to hide the message sent to the bot).
So something like
.tap(builder.CardAction.imBack(session, 'I have been tapped'))

Resources