vvlad1973-telegram-framework
Version:
Current version: *7.9.5*
681 lines (178 loc) • 8.27 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: BotCommandsArray</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">Class: BotCommandsArray</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>
<span class="ancestors"><a href="module-bot_commands.html">bot_commands</a>~</span>BotCommandsArray<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="module-bot_commands.html#.BotCommand">module:bot_commands.BotCommand</a>>}</span></h2>
<div class="class-description">Implements structure for operations with Telegram bot's commands</div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="BotCommandsArray"><span class="type-signature"></span>new BotCommandsArray<span class="signature">()</span><span class="type-signature"> → {Array.<<a href="module-bot_commands.html#.BotCommand">module:bot_commands.BotCommand</a>>}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="bot_commands.js.html">bot_commands.js</a>, <a href="bot_commands.js.html#line17">line 17</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array.<<a href="module-bot_commands.html#.BotCommand">module:bot_commands.BotCommand</a>></span>
</dd>
</dl>
</div>
<h3 class="subsection-title">Extends</h3>
<ul>
<li>Array</li>
</ul>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="addCommand"><span class="type-signature"></span>addCommand<span class="signature">(command, description)</span><span class="type-signature"> → {number|boolean}</span></h4>
<div class="description">
Method which adds command to bot's commands array
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>command</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>description</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="bot_commands.js.html">bot_commands.js</a>, <a href="bot_commands.js.html#line35">line 35</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
- If success - length of commands array,
if fail - false
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
|
<span class="param-type">boolean</span>
</dd>
</dl>
<h4 class="name" id="deleteCommand"><span class="type-signature"></span>deleteCommand<span class="signature">(command)</span><span class="type-signature"></span></h4>
<div class="description">
Method which deletes some command from command's array
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>command</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="bot_commands.js.html">bot_commands.js</a>, <a href="bot_commands.js.html#line59">line 59</a>
</li></ul></dd>
</dl>
<h4 class="name" id="isExistsCommand"><span class="type-signature"></span>isExistsCommand<span class="signature">(command)</span><span class="type-signature"> → {boolean}</span></h4>
<div class="description">
Method which checks exist some command in commands' array
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>command</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="bot_commands.js.html">bot_commands.js</a>, <a href="bot_commands.js.html#line50">line 50</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</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>