mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-17 19:26:20 +00:00
249 lines
9.4 KiB
HTML
249 lines
9.4 KiB
HTML
<!doctype html>
|
||
<html>
|
||
|
||
<head>
|
||
<meta name="generator" content="JSDoc 3.6.7">
|
||
<meta charset="utf-8">
|
||
<title>whatsapp-web.js 1.19.2 » Class: Buttons</title>
|
||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Karla:400,400i,700,700i" type="text/css">
|
||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Noto+Serif:400,400i,700,700i" type="text/css">
|
||
<link rel="stylesheet" href="https://brick.a.ssl.fastly.net/Inconsolata:500" type="text/css">
|
||
<link href="css/baseline.css" rel="stylesheet">
|
||
</head>
|
||
|
||
<body onload="prettyPrint()">
|
||
<nav id="jsdoc-navbar" role="navigation" class="jsdoc-navbar">
|
||
<div id="jsdoc-navbar-container">
|
||
<div id="jsdoc-navbar-content">
|
||
<a href="index.html" class="jsdoc-navbar-package-name">whatsapp-web.<wbr>js 1.<wbr>19.<wbr>2</a>
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
<div id="jsdoc-body-container">
|
||
<div id="jsdoc-content">
|
||
<div id="jsdoc-content-container">
|
||
<div id="jsdoc-main" role="main">
|
||
<header class="page-header">
|
||
<div class="symbol-detail-labels"><span class="label label-kind">class</span></div>
|
||
<h1><small></small><span class="symbol-name">Buttons</span></h1>
|
||
<p class="source-link">Source: <a href="structures_Buttons.js.html#source-line-23">structures/<wbr>Buttons.<wbr>js:23</a></p>
|
||
<div class="symbol-classdesc">
|
||
<p>Message type buttons</p>
|
||
</div>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
</header>
|
||
<section id="summary">
|
||
<div class="summary-callout">
|
||
<h2 class="summary-callout-heading">Properties</h2>
|
||
<div class="summary-content">
|
||
<div class="summary-column">
|
||
<dl class="dl-summary-callout">
|
||
<dt><a href="Buttons.html#body">body</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="Buttons.html#buttons">buttons</a></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
</div>
|
||
<div class="summary-column">
|
||
<dl class="dl-summary-callout">
|
||
<dt><a href="Buttons.html#footer">footer</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="Buttons.html#title">title</a></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
</div>
|
||
<div class="summary-column">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="summary-callout">
|
||
<h2 class="summary-callout-heading">Method</h2>
|
||
<div class="summary-content">
|
||
<div class="summary-column">
|
||
<dl class="dl-summary-callout">
|
||
<dt><a href="Buttons.html#_format">_format(buttons)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
</div>
|
||
<div class="summary-column">
|
||
</div>
|
||
<div class="summary-column">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section>
|
||
<h2 id="Buttons">new <span class="symbol-name">Buttons</span><span class="signature"><span class="signature-params">(body, buttons, title, footer)</span></span></h2>
|
||
<section>
|
||
<h3>Parameters</h3>
|
||
<table class="jsdoc-details-table">
|
||
<thead>
|
||
<tr>
|
||
<th>Name</th>
|
||
<th>Type</th>
|
||
<th>Optional</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<p>body</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>buttons</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p>See <a href="global.html#ButtonSpec"><code>ButtonSpec</code></a></p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>title</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p>Value can be null.</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>footer</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p>Value can be null.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
</section>
|
||
<section>
|
||
<h2>Properties</h2>
|
||
<section>
|
||
<h3 id="body"><span class="symbol-name">body</span><small class="property-type">
|
||
(string or <a href="MessageMedia.html">MessageMedia</a>)</small></h3>
|
||
<p>Message body</p>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
<h3 id="buttons"><span class="symbol-name">buttons</span><small class="property-type">
|
||
Array of <a href="global.html#FormattedButtonSpec">FormattedButtonSpec</a></small></h3>
|
||
<p>buttons of message</p>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
<h3 id="footer"><span class="symbol-name">footer</span><small class="property-type">
|
||
string</small></h3>
|
||
<p>footer of message</p>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
<h3 id="title"><span class="symbol-name">title</span><small class="property-type">
|
||
string</small></h3>
|
||
<p>title of message</p>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
</section>
|
||
<h2>Method</h2>
|
||
<section>
|
||
<h3 id="_format"><span class="symbol-name">_format</span><span class="signature"><span class="signature-params">(buttons)</span> → <span class="signature-returns"> Array of <a href="global.html#FormattedButtonSpec">FormattedButtonSpec</a></span></span></h3>
|
||
<p>Creates button array from simple array</p>
|
||
<section>
|
||
<h4>
|
||
Example
|
||
</h4>
|
||
<div>
|
||
<pre class="prettyprint"><code>Input: [{id:'customId',body:'button1'},{body:'button2'},{body:'button3'},{body:'button4'}]
|
||
Returns: [{ buttonId:'customId',buttonText:{'displayText':'button1'},type: 1 },{buttonId:'n3XKsL',buttonText:{'displayText':'button2'},type:1},{buttonId:'NDJk0a',buttonText:{'displayText':'button3'},type:1}]</code></pre>
|
||
</div>
|
||
</section>
|
||
<section>
|
||
<h4>Parameter</h4>
|
||
<table class="jsdoc-details-table">
|
||
<thead>
|
||
<tr>
|
||
<th>Name</th>
|
||
<th>Type</th>
|
||
<th>Optional</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<p>buttons</p>
|
||
</td>
|
||
<td>
|
||
<p>Array of <a href="global.html#ButtonSpec">ButtonSpec</a></p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Array of <a href="global.html#FormattedButtonSpec">FormattedButtonSpec</a></code> </p>
|
||
</dd>
|
||
</dl>
|
||
</section>
|
||
</section>
|
||
</div>
|
||
</div>
|
||
<nav id="jsdoc-toc-nav" role="navigation"></nav>
|
||
</div>
|
||
</div>
|
||
<footer id="jsdoc-footer" class="jsdoc-footer">
|
||
<div id="jsdoc-footer-container">
|
||
<p>
|
||
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc</a> 3.6.7 on January 15, 2023.
|
||
</p>
|
||
</div>
|
||
</footer>
|
||
<script src="scripts/jquery.min.js"></script>
|
||
<script src="scripts/tree.jquery.js"></script>
|
||
<script src="scripts/prettify.js"></script>
|
||
<script src="scripts/jsdoc-toc.js"></script>
|
||
<script src="scripts/linenumber.js"></script>
|
||
<script src="scripts/scrollanchor.js"></script>
|
||
</body>
|
||
|
||
</html> |