mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-18 03:29:14 +00:00
570 lines
23 KiB
HTML
570 lines
23 KiB
HTML
<!doctype html>
|
||
<html>
|
||
|
||
<head>
|
||
<meta name="generator" content="JSDoc 3.6.3">
|
||
<meta charset="utf-8">
|
||
<title>whatsapp-web.js 1.0.1 » Class: GroupChat</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>0.<wbr>1</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">GroupChat</span></h1>
|
||
<p class="source-link">Source: <a href="structures_GroupChat.js.html#source-line-9">structures/<wbr>GroupChat.<wbr>js:9</a></p>
|
||
<div class="symbol-classdesc">
|
||
<p>Represents a Group Chat on WhatsApp</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="GroupChat.html#createdAt">createdAt</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#description">description</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#id">id</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#isGroup">isGroup</a></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
</div>
|
||
<div class="summary-column">
|
||
<dl class="dl-summary-callout">
|
||
<dt><a href="GroupChat.html#isReadOnly">isReadOnly</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#name">name</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#owner">owner</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#participants">participants</a></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
</div>
|
||
<div class="summary-column">
|
||
<dl class="dl-summary-callout">
|
||
<dt><a href="GroupChat.html#timestamp">timestamp</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#unreadCount">unreadCount</a></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="summary-callout">
|
||
<h2 class="summary-callout-heading">Methods</h2>
|
||
<div class="summary-content">
|
||
<div class="summary-column">
|
||
<dl class="dl-summary-callout">
|
||
<dt><a href="GroupChat.html#.getInviteInfo">getInviteInfo(inviteCode)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#.join">join(inviteCode)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#addParticipants">addParticipants(participantIds)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#demoteParticipants">demoteParticipants(participantIds)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
</div>
|
||
<div class="summary-column">
|
||
<dl class="dl-summary-callout">
|
||
<dt><a href="GroupChat.html#getInviteCode">getInviteCode()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#leave">leave()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#promoteParticipants">promoteParticipants(participantIds)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#removeParticipants">removeParticipants(participantIds)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
</div>
|
||
<div class="summary-column">
|
||
<dl class="dl-summary-callout">
|
||
<dt><a href="GroupChat.html#revokeInvite">revokeInvite()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#sendMessage">sendMessage(content, options)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#setDescription">setDescription(description)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#setSubject">setSubject(subject)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
<section>
|
||
<h2 id="GroupChat">new <span class="symbol-name">GroupChat</span><span class="signature"><span class="signature-params">()</span></span></h2>
|
||
<dl class="dl-compact">
|
||
<dt>Extends</dt>
|
||
<dd><a href="Chat.html">Chat</a></dd>
|
||
</dl>
|
||
</section>
|
||
<section>
|
||
<h2>Properties</h2>
|
||
<section>
|
||
<h3 id="createdAt"><span class="symbol-name">createdAt</span><small class="property-type">
|
||
date</small></h3>
|
||
<p>Gets the date at which the group was created</p>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
<h3 id="description"><span class="symbol-name">description</span><small class="property-type">
|
||
string</small></h3>
|
||
<p>Gets the group description</p>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
<h3 id="id"><span class="symbol-name">id</span><small class="property-type">
|
||
unknown</small></h3>
|
||
<p>ID that represents the chat</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#id">Chat#id</a></dd>
|
||
</dl>
|
||
<h3 id="isGroup"><span class="symbol-name">isGroup</span><small class="property-type">
|
||
unknown</small></h3>
|
||
<p>Indicates if the Chat is a Group Chat</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#isGroup">Chat#isGroup</a></dd>
|
||
</dl>
|
||
<h3 id="isReadOnly"><span class="symbol-name">isReadOnly</span><small class="property-type">
|
||
unknown</small></h3>
|
||
<p>Indicates if the Chat is readonly</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#isReadOnly">Chat#isReadOnly</a></dd>
|
||
</dl>
|
||
<h3 id="name"><span class="symbol-name">name</span><small class="property-type">
|
||
unknown</small></h3>
|
||
<p>Title of the chat</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#name">Chat#name</a></dd>
|
||
</dl>
|
||
<h3 id="owner"><span class="symbol-name">owner</span></h3>
|
||
<p>Gets the group owner</p>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
<h3 id="participants"><span class="symbol-name">participants</span><small class="property-type">
|
||
array</small></h3>
|
||
<p>Gets the group participants</p>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
<h3 id="timestamp"><span class="symbol-name">timestamp</span><small class="property-type">
|
||
unknown</small></h3>
|
||
<p>Unix timestamp for when the chat was created</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#timestamp">Chat#timestamp</a></dd>
|
||
</dl>
|
||
<h3 id="unreadCount"><span class="symbol-name">unreadCount</span><small class="property-type">
|
||
unknown</small></h3>
|
||
<p>Amount of messages unread</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#unreadCount">Chat#unreadCount</a></dd>
|
||
</dl>
|
||
</section>
|
||
<h2>Methods</h2>
|
||
<section>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span> <span class="label label-static">static</span></div>
|
||
<h3 id=".getInviteInfo"><span class="symbol-name">getInviteInfo</span><span class="signature"><span class="signature-params">(inviteCode)</span> → <span class="signature-returns"> Promise containing object</span></span></h3>
|
||
<p>Returns an object with information about the invite code's group</p>
|
||
<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>inviteCode</p>
|
||
</td>
|
||
<td>
|
||
<p>string</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Promise containing object</code> <p>Invite information</p>
|
||
</p>
|
||
</dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span> <span class="label label-static">static</span></div>
|
||
<h3 id=".join"><span class="symbol-name">join</span><span class="signature"><span class="signature-params">(inviteCode)</span></span></h3>
|
||
<p>Joins a group with an invite code</p>
|
||
<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>inviteCode</p>
|
||
</td>
|
||
<td>
|
||
<p>string</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="addParticipants"><span class="symbol-name">addParticipants</span><span class="signature"><span class="signature-params">(participantIds)</span></span></h3>
|
||
<p>Adds a list of participants by ID to the group</p>
|
||
<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>participantIds</p>
|
||
</td>
|
||
<td>
|
||
<p>Array of string</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="demoteParticipants"><span class="symbol-name">demoteParticipants</span><span class="signature"><span class="signature-params">(participantIds)</span></span></h3>
|
||
<p>Demotes participants by IDs to regular users</p>
|
||
<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>participantIds</p>
|
||
</td>
|
||
<td>
|
||
<p>Array of string</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="getInviteCode"><span class="symbol-name">getInviteCode</span><span class="signature"><span class="signature-params">()</span></span></h3>
|
||
<p>Gets the invite code for a specific group</p>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="leave"><span class="symbol-name">leave</span><span class="signature"><span class="signature-params">()</span></span></h3>
|
||
<p>Makes the bot leave the group</p>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="promoteParticipants"><span class="symbol-name">promoteParticipants</span><span class="signature"><span class="signature-params">(participantIds)</span></span></h3>
|
||
<p>Promotes participants by IDs to admins</p>
|
||
<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>participantIds</p>
|
||
</td>
|
||
<td>
|
||
<p>Array of string</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="removeParticipants"><span class="symbol-name">removeParticipants</span><span class="signature"><span class="signature-params">(participantIds)</span></span></h3>
|
||
<p>Removes a list of participants by ID to the group</p>
|
||
<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>participantIds</p>
|
||
</td>
|
||
<td>
|
||
<p>Array of string</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="revokeInvite"><span class="symbol-name">revokeInvite</span><span class="signature"><span class="signature-params">()</span></span></h3>
|
||
<p>Invalidates the current group invite code and generates a new one</p>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="sendMessage"><span class="symbol-name">sendMessage</span><span class="signature"><span class="signature-params">(content, options)</span> → <span class="signature-returns"> Promise containing <a href="Message.html">Message</a></span></span></h3>
|
||
<p>Send a message to this chat</p>
|
||
<section>
|
||
<h4>Parameters</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>content</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>options</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#sendMessage">Chat#sendMessage</a></dd>
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p>Message that was just sent</p>
|
||
</dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="setDescription"><span class="symbol-name">setDescription</span><span class="signature"><span class="signature-params">(description)</span></span></h3>
|
||
<p>Updates the group description</p>
|
||
<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>description</p>
|
||
</td>
|
||
<td>
|
||
<p>string</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="setSubject"><span class="symbol-name">setSubject</span><span class="signature"><span class="signature-params">(subject)</span></span></h3>
|
||
<p>Updates the group subject</p>
|
||
<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>subject</p>
|
||
</td>
|
||
<td>
|
||
<p>string</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
</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.3 on February 9, 2020.
|
||
</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> |