UNPKG

vvlad1973-telegram-framework

Version:
704 lines (218 loc) 12.8 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Module: inline_keyboard_markup</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Module: inline_keyboard_markup</h1> <section> <header> </header> <article> <div class="container-overview"> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="inline_keyboard_markup.js.html">inline_keyboard_markup.js</a>, <a href="inline_keyboard_markup.js.html#line1">line 1</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Classes</h3> <dl> <dt><a href="module-inline_keyboard_markup.InlineKeyboardMarkup.html">InlineKeyboardMarkup</a></dt> <dd></dd> </dl> <h3 class="subsection-title">Type Definitions</h3> <h4 class="name" id=".InlineKeyboardButton">InlineKeyboardButton</h4> <h5>Type:</h5> <ul> <li> <span class="param-type">Object</span> </li> </ul> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>text</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">Text of the button. If none of the optional fields are used, it will be sent as a message when the button is pressed</td> </tr> <tr> <td class="name"><code>url</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">HTTP or tg:// url to be opened when the button is pressed. Links tg://user?id=<user_id> can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings</td> </tr> <tr> <td class="name"><code>callback_data</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes</td> </tr> <tr> <td class="name"><code>login_url</code></td> <td class="type"> <span class="param-type"><a href="module-inline_keyboard_markup.html#.LoginUrl">module:inline_keyboard_markup.LoginUrl</a></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">An HTTP URL used to automatically authorize the user. Can be used as a replacement for the Telegram Login Widget</td> </tr> <tr> <td class="name"><code>switch_inline_query</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot's username will be inserted</td> </tr> <tr> <td class="name"><code>switch_inline_query_current_chat</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot's username will be inserted</td> </tr> <tr> <td class="name"><code>callback_game</code></td> <td class="type"> <span class="param-type">CallbackGame</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">Description of the game that will be launched when the user presses the button. NOTE: This type of button must always be the first button in the first row</td> </tr> <tr> <td class="name"><code>pay</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">Specify True, to send a Pay button. NOTE: This type of button must always be the first button in the first row and can only be used in invoice messages</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="inline_keyboard_markup.js.html">inline_keyboard_markup.js</a>, <a href="inline_keyboard_markup.js.html#line8">line 8</a> </li></ul></dd> </dl> <h4 class="name" id=".LoginUrl">LoginUrl</h4> <h5>Type:</h5> <ul> <li> <span class="param-type">Object</span> </li> </ul> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>url</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last">An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data. NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization</td> </tr> <tr> <td class="name"><code>forward_text</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">New text of the button in forwarded messages</td> </tr> <tr> <td class="name"><code>bot_username</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details</td> </tr> <tr> <td class="name"><code>request_write_access</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last">Pass True to request the permission for your bot to send messages to the user</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="inline_keyboard_markup.js.html">inline_keyboard_markup.js</a>, <a href="inline_keyboard_markup.js.html#line38">line 38</a> </li></ul></dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-base_telegram_bot.html">base_telegram_bot</a></li><li><a href="module-bot_commands.html">bot_commands</a></li><li><a href="module-enums.html">enums</a></li><li><a href="module-inline_keyboard_markup.html">inline_keyboard_markup</a></li><li><a href="module-reply_keyboard_markup.html">reply_keyboard_markup</a></li><li><a href="module-sender.html">sender</a></li></ul><h3>Classes</h3><ul><li><a href="module-base_telegram_bot.BaseTelegramBot.html">BaseTelegramBot</a></li><li><a href="module-bot_commands-BotCommandsArray.html">BotCommandsArray</a></li><li><a href="module-inline_keyboard_markup.InlineKeyboardMarkup.html">InlineKeyboardMarkup</a></li><li><a href="module-reply_keyboard_markup.ReplyKeyboardMarkup.html">ReplyKeyboardMarkup</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Sun Mar 26 2023 20:28:31 GMT+0300 (Москва, стандартное время) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>