You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
keyboardJson += ", [{ \"text\" : \"Send text\", \"callback_data\" : \"This text was sent by inline button\" }]"; // add another button
81
+
//keyboardJson += ", [{ \"text\" : \"Go to Google\", \"url\" : \"https://www.google.com\" }]"; // add another button, this one appears after first Update
82
+
keyboardJson += "]"; // end Json
83
+
84
+
// Now send this message including the current message_id as the 5th input to UPDATE that message
This is an example of how one can update inline keyboard messages (buttons).
4
+
The message_id of the specific message is sent when a message is received.
5
+
This message_id can be used to UPDATE that message.
6
+
One can update text inside a message, but also buttons can be updated.
7
+
This way one can build menu's, like the menu the botfather uses.
8
+
9
+
In this simple example we use a inlinekeyboard button to toggle (and update) the state of a LED.
10
+
11
+
NOTE: You will need to enter your SSID, password and bot Token for the example to work.
12
+
13
+
Example and update to Universal-Arduino-Telegram-Bot originally written by
14
+
[Frits Jan van Kempen] (https://github.com/fritsjan) with inspiration from [RomeHein] (https://github.com/RomeHein)
15
+
16
+
Adapted by [Brian Lough](https://github.com/witnessmenow)
17
+
18
+
## License
19
+
20
+
You may copy, distribute and modify the software provided that modifications are described and licensed for free under [LGPL-3](http://www.gnu.org/licenses/lgpl-3.0.html). Derivatives works (including modifications or anything statically linked to the library) can only be redistributed under [LGPL-3](http://www.gnu.org/licenses/lgpl-3.0.html), but applications that use the library don't have to be.
0 commit comments