Telegram Bot api custom keyboard additional data values - api

Is there any way to pass additional data values from custom keyboard layout buttons?
I need to pass a value like ID that they are hidden from user:
{"Button1",{"id":1}} ...

You cannot do it with custom keyboards, but it is possible with callback_data param of InlineKeyboard
When user will press inline button with callback_data specified message received by bot will be type of CallbackQuery with data param containing your data from the button.

That's not currently possible. It would be a great addition to the API, though, in order to separate the text you see from the value you send back to the bot.

Related

custom FirebaseAdmin.Messaging.Message

I am going to send a notification through the admin panel and I searched to get the following code.
The problem here is that the data I pass has several fields, the notification has only 3 fields here. Do you have a way to add notification values?

Show an additional (/) button in the input field?

Could you please tell me how I could have an additional (/) button in the input field ? As shown here in this image:
https://core.telegram.org/file/811140659/1/RRJyulbtLBY/ea6163411c7eb4f4dc
I have written a bot using this library: https://github.com/python-telegram-bot/python-telegram-bot.
And found out that:
"Show an additional (/) button in the input field in all chats with bots. Tapping it types a '/' and shows the list of commands."
in this page: https://core.telegram.org/bots#commands.
Unfortunately my bot does not have that, using the Telegram app on my iphone.
I also have tried to provide the list of commands using Botfather, but still no yield.
If you have set the commands with Botfather, it should work. Alternatively, you can set the commands programmatically with the setMyCommands method - in python-telegram-bot, that's Bot.set_my_commands.

Flutter Testing: Retrieving values from text field

I am currently testing my login page in flutter and I want to make sure that the values I am entering are the ones being passed when I click log-in (username and password). I want to do more than just validate if the inputs are in a certain format. I would like to see if I wrote "Tom123" it returns "Tom123". What is the best way to go about testing this?
I believe there is a documentation specific for this kind of test:
enterText method
Give the text input widget specified by finder the focus and replace
its content with text, as if it had been provided by the onscreen
keyboard.

Button payload / callback?

I want to be able to reply to a user with my bot based on a button they pressed. So far, the only property I can find for button.onClick is "openUrl", but it doesn't seem possible to assign the button a value or a payload / callback URL. Additionally, there is no "Button Tapped" event.
How can I use buttons to allow my user to interact with my bot?
There are multiple ways to add a button response to Hangouts Chat. The primary one seems to be via using Cards with either KeyValue, or ActionResponse.
https://developers.google.com/hangouts/chat/how-tos/cards-onclick
You can use:
buttons.onClick.parameters.keyValue to pass unique Parameters
textButton.onClick.openLink to open a link with a text button
ActionResponse to update a card with a custom card when a Click event occurs.

How to override the service now's email notification onclick event

I have a requirement like, When I click the email notification link in service now, the system should check for particular field is not null or null, if it is not null then only the service now's email notification window should open, otherwise one alert box should come say like pls enter that field first
As long as you are ok w/ all this validation being done client side you could modify the onClick event on the email notification link and add an additional function to check the value of the field and if not null, then call the original email onClick function.
Prototype is available in ServiceNow Forms clients side and provides a method to update attributes on elements.
You would need to modify the onClick function on the element with id='email_client_open', add a new onClick function to check that the field in question is populated and if so call the original function 'emailClientOpen(this, 'incident')' with the appropriate parameters.