1309 lines
No EOL
62 KiB
HTML
1309 lines
No EOL
62 KiB
HTML
<!doctype html>
|
||
<html>
|
||
|
||
<head>
|
||
<meta name="generator" content="JSDoc 3.6.11">
|
||
<meta charset="utf-8">
|
||
<title>whatsapp-web.js 1.34.5-alpha.3 » 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>34.<wbr>5-alpha.<wbr>3</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-17">structures/<wbr>GroupChat.<wbr>js:17</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#archived">archived</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<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#isMuted">isMuted</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#isReadOnly">isReadOnly</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#lastMessage">lastMessage</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#muteExpiration">muteExpiration</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#name">name</a></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
</div>
|
||
<div class="summary-column">
|
||
<dl class="dl-summary-callout">
|
||
<dt><a href="GroupChat.html#owner">owner</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#participants">participants</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#pinned">pinned</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<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#addOrEditCustomerNote">addOrEditCustomerNote(note)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#addParticipants">addParticipants(participantIds, options)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#approveGroupMembershipRequests">approveGroupMembershipRequests(options)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#archive">archive()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#changeLabels">changeLabels(labelIds)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#clearMessages">clearMessages()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#clearState">clearState()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#delete">delete()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#deletePicture">deletePicture()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#demoteParticipants">demoteParticipants(participantIds)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#fetchMessages">fetchMessages(searchOptions)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#getContact">getContact()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#getCustomerNote">getCustomerNote()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
</div>
|
||
<div class="summary-column">
|
||
<dl class="dl-summary-callout">
|
||
<dt><a href="GroupChat.html#getGroupMembershipRequests">getGroupMembershipRequests()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#getInviteCode">getInviteCode()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#getLabels">getLabels()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#getPinnedMessages">getPinnedMessages()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#leave">leave()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#markUnread">markUnread()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#mute">mute(unmuteDate)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#pin">pin()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#promoteParticipants">promoteParticipants(participantIds)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#rejectGroupMembershipRequests">rejectGroupMembershipRequests(options)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#removeParticipants">removeParticipants(participantIds)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#revokeInvite">revokeInvite()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#sendMessage">sendMessage(content[, options])</a></dt>
|
||
<dd>
|
||
</dd>
|
||
</dl>
|
||
</div>
|
||
<div class="summary-column">
|
||
<dl class="dl-summary-callout">
|
||
<dt><a href="GroupChat.html#sendSeen">sendSeen()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#sendStateRecording">sendStateRecording()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#sendStateTyping">sendStateTyping()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#setAddMembersAdminsOnly">setAddMembersAdminsOnly([adminsOnly])</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#setDescription">setDescription(description)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#setInfoAdminsOnly">setInfoAdminsOnly([adminsOnly])</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#setMessagesAdminsOnly">setMessagesAdminsOnly([adminsOnly])</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#setPicture">setPicture(media)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#setSubject">setSubject(subject)</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#syncHistory">syncHistory()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#unarchive">unarchive()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#unmute">unmute()</a></dt>
|
||
<dd>
|
||
</dd>
|
||
<dt><a href="GroupChat.html#unpin">unpin()</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="archived"><span class="symbol-name">archived</span><small class="property-type">
|
||
unknown</small></h3>
|
||
<p>Indicates if the Chat is archived</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#archived">Chat#archived</a></dd>
|
||
</dl>
|
||
<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="isMuted"><span class="symbol-name">isMuted</span><small class="property-type">
|
||
unknown</small></h3>
|
||
<p>Indicates if the chat is muted or not</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#isMuted">Chat#isMuted</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="lastMessage"><span class="symbol-name">lastMessage</span><small class="property-type">
|
||
unknown</small></h3>
|
||
<p>Last message fo chat</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#lastMessage">Chat#lastMessage</a></dd>
|
||
</dl>
|
||
<h3 id="muteExpiration"><span class="symbol-name">muteExpiration</span><small class="property-type">
|
||
unknown</small></h3>
|
||
<p>Unix timestamp for when the mute expires</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#muteExpiration">Chat#muteExpiration</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><small class="property-type">
|
||
<a href="global.html#ContactId">ContactId</a></small></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 of <a href="global.html#GroupParticipant">GroupParticipant</a></small></h3>
|
||
<p>Gets the group participants</p>
|
||
<dl class="dl-compact">
|
||
</dl>
|
||
<h3 id="pinned"><span class="symbol-name">pinned</span><small class="property-type">
|
||
unknown</small></h3>
|
||
<p>Indicates if the Chat is pinned</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#pinned">Chat#pinned</a></dd>
|
||
</dl>
|
||
<h3 id="timestamp"><span class="symbol-name">timestamp</span><small class="property-type">
|
||
unknown</small></h3>
|
||
<p>Unix timestamp for when the last activity occurred</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></div>
|
||
<h3 id="addOrEditCustomerNote"><span class="symbol-name">addOrEditCustomerNote</span><span class="signature"><span class="signature-params">(note)</span> → <span class="signature-returns"> Promise containing void</span></span></h3>
|
||
<p>Add or edit a customer note</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>note</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p>The note to add</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#addOrEditCustomerNote">Chat#addOrEditCustomerNote</a></dd>
|
||
<dt>See also</dt>
|
||
<dd><a href="https://faq.whatsapp.com/1433099287594476">https://faq.whatsapp.com/1433099287594476</a></dd>
|
||
<dt>Returns</dt>
|
||
<dd></dd>
|
||
</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, options)</span> → <span class="signature-returns"> Promise containing (Object with <a href="global.html#AddParticipantsResult">AddParticipantsResult</a> properties or string)</span></span></h3>
|
||
<p>Adds a list of participants by ID to the group</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>participantIds</p>
|
||
</td>
|
||
<td>
|
||
<p>(string or Array of string)</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>options</p>
|
||
</td>
|
||
<td>
|
||
<p><a href="global.html#AddParticipnatsOptions">AddParticipnatsOptions</a></p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p>An object thay handles options for adding participants</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Promise containing (Object with <a href="global.html#AddParticipantsResult">AddParticipantsResult</a> properties or string)</code>
|
||
<p>Returns an object with the resulting data or an error message as a string</p>
|
||
</p>
|
||
</dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="approveGroupMembershipRequests"><span class="symbol-name">approveGroupMembershipRequests</span><span class="signature"><span class="signature-params">(options)</span> → <span class="signature-returns"> Promise containing Array of <a href="global.html#MembershipRequestActionResult">MembershipRequestActionResult</a></span></span></h3>
|
||
<p>Approves membership requests if any</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>options</p>
|
||
</td>
|
||
<td>
|
||
<p><a href="global.html#MembershipRequestActionOptions">MembershipRequestActionOptions</a></p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p>Options for performing a membership request action</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Promise containing Array of <a href="global.html#MembershipRequestActionResult">MembershipRequestActionResult</a></code>
|
||
<p>Returns an array of requester IDs whose membership requests were approved and an error for each requester, if any occurred during the operation. If there are no requests, an empty array will be returned</p>
|
||
</p>
|
||
</dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="archive"><span class="symbol-name">archive</span><span class="signature"><span class="signature-params">()</span></span></h3>
|
||
<p>Archives this chat</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#archive">Chat#archive</a></dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="changeLabels"><span class="symbol-name">changeLabels</span><span class="signature"><span class="signature-params">(labelIds)</span> → <span class="signature-returns"> Promise containing void</span></span></h3>
|
||
<p>Add or remove labels to this Chat</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>labelIds</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#changeLabels">Chat#changeLabels</a></dd>
|
||
<dt>Returns</dt>
|
||
<dd></dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="clearMessages"><span class="symbol-name">clearMessages</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||
<p>Clears all messages from the chat</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#clearMessages">Chat#clearMessages</a></dd>
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p>result</p>
|
||
</dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="clearState"><span class="symbol-name">clearState</span><span class="signature"><span class="signature-params">()</span></span></h3>
|
||
<p>Stops typing or recording in chat immediately.</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#clearState">Chat#clearState</a></dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="delete"><span class="symbol-name">delete</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing Boolean</span></span></h3>
|
||
<p>Deletes the chat</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#delete">Chat#delete</a></dd>
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p>result</p>
|
||
</dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="deletePicture"><span class="symbol-name">deletePicture</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||
<p>Deletes the group's picture.</p>
|
||
<dl class="dl-compact">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Promise containing boolean</code>
|
||
<p>Returns true if the picture was properly deleted. This can return false if the user does not have the necessary permissions.</p>
|
||
</p>
|
||
</dd>
|
||
</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 class="signature-returns"> Promise containing {status: number}</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">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Promise containing {status: number}</code>
|
||
<p>Object with status code indicating if the operation was successful</p>
|
||
</p>
|
||
</dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="fetchMessages"><span class="symbol-name">fetchMessages</span><span class="signature"><span class="signature-params">(searchOptions)</span> → <span class="signature-returns"> Promise containing Array of <a href="Message.html">Message</a></span></span></h3>
|
||
<p>Loads chat messages, sorted from earliest to latest.</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>searchOptions</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p>Options for searching messages. Right now only limit and fromMe is supported.</p>
|
||
<p>Values in <code>searchOptions</code> have the following properties:</p>
|
||
<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>limit</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p>Yes</p>
|
||
</td>
|
||
<td>
|
||
<p>The amount of messages to return. If no limit is specified, the available messages will be returned. Note that the actual number of returned messages may be smaller if there aren't enough messages in the conversation. Set this to Infinity to load all messages.</p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<p>fromMe</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p>Yes</p>
|
||
</td>
|
||
<td>
|
||
<p>Return only messages from the bot number or vise versa. To get all messages, leave the option undefined.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#fetchMessages">Chat#fetchMessages</a></dd>
|
||
<dt>Returns</dt>
|
||
<dd></dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="getContact"><span class="symbol-name">getContact</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing <a href="Contact.html">Contact</a></span></span></h3>
|
||
<p>Returns the Contact that corresponds to this Chat.</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#getContact">Chat#getContact</a></dd>
|
||
<dt>Returns</dt>
|
||
<dd></dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="getCustomerNote"><span class="symbol-name">getCustomerNote</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing {chatId: string, content: string, createdAt: number, id: string, modifiedAt: number, type: string}</span></span></h3>
|
||
<p>Get a customer note</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#getCustomerNote">Chat#getCustomerNote</a></dd>
|
||
<dt>See also</dt>
|
||
<dd><a href="https://faq.whatsapp.com/1433099287594476">https://faq.whatsapp.com/1433099287594476</a></dd>
|
||
<dt>Returns</dt>
|
||
<dd></dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="getGroupMembershipRequests"><span class="symbol-name">getGroupMembershipRequests</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing Array of <a href="global.html#GroupMembershipRequest">GroupMembershipRequest</a></span></span></h3>
|
||
<p>Gets an array of membership requests</p>
|
||
<dl class="dl-compact">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Promise containing Array of <a href="global.html#GroupMembershipRequest">GroupMembershipRequest</a></code>
|
||
<p>An array of membership requests</p>
|
||
</p>
|
||
</dd>
|
||
</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 class="signature-returns"> Promise containing string</span></span></h3>
|
||
<p>Gets the invite code for a specific group</p>
|
||
<dl class="dl-compact">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Promise containing string</code>
|
||
<p>Group's invite code</p>
|
||
</p>
|
||
</dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="getLabels"><span class="symbol-name">getLabels</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing Array of <a href="Label.html">Label</a></span></span></h3>
|
||
<p>Returns array of all Labels assigned to this Chat</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#getLabels">Chat#getLabels</a></dd>
|
||
<dt>Returns</dt>
|
||
<dd></dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="getPinnedMessages"><span class="symbol-name">getPinnedMessages</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing Array of <a href="Message.html">Message</a></span></span></h3>
|
||
<p>Gets instances of all pinned messages in a chat</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#getPinnedMessages">Chat#getPinnedMessages</a></dd>
|
||
<dt>Returns</dt>
|
||
<dd></dd>
|
||
</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 class="signature-returns"> Promise</span></span></h3>
|
||
<p>Makes the bot leave the group</p>
|
||
<dl class="dl-compact">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Promise</code> </p>
|
||
</dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="markUnread"><span class="symbol-name">markUnread</span><span class="signature"><span class="signature-params">()</span></span></h3>
|
||
<p>Mark this chat as unread</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#markUnread">Chat#markUnread</a></dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="mute"><span class="symbol-name">mute</span><span class="signature"><span class="signature-params">(unmuteDate)</span> → <span class="signature-returns"> Promise containing {isMuted: boolean, muteExpiration: number}</span></span></h3>
|
||
<p>Mutes this chat forever, unless a date is specified</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>unmuteDate</p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p>Date when the chat will be unmuted, don't provide a value to mute forever</p>
|
||
<p>Value can be null.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#mute">Chat#mute</a></dd>
|
||
<dt>Returns</dt>
|
||
<dd></dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="pin"><span class="symbol-name">pin</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||
<p>Pins this chat</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#pin">Chat#pin</a></dd>
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p>New pin state. Could be false if the max number of pinned chats was reached.</p>
|
||
</dd>
|
||
</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 class="signature-returns"> Promise containing {status: number}</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">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Promise containing {status: number}</code>
|
||
<p>Object with status code indicating if the operation was successful</p>
|
||
</p>
|
||
</dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="rejectGroupMembershipRequests"><span class="symbol-name">rejectGroupMembershipRequests</span><span class="signature"><span class="signature-params">(options)</span> → <span class="signature-returns"> Promise containing Array of <a href="global.html#MembershipRequestActionResult">MembershipRequestActionResult</a></span></span></h3>
|
||
<p>Rejects membership requests if any</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>options</p>
|
||
</td>
|
||
<td>
|
||
<p><a href="global.html#MembershipRequestActionOptions">MembershipRequestActionOptions</a></p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
<p>Options for performing a membership request action</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Promise containing Array of <a href="global.html#MembershipRequestActionResult">MembershipRequestActionResult</a></code>
|
||
<p>Returns an array of requester IDs whose membership requests were rejected and an error for each requester, if any occurred during the operation. If there are no requests, an empty array will be returned</p>
|
||
</p>
|
||
</dd>
|
||
</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 class="signature-returns"> Promise containing {status: number}</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">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Promise containing {status: number}</code> </p>
|
||
</dd>
|
||
</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 class="signature-returns"> Promise containing string</span></span></h3>
|
||
<p>Invalidates the current group invite code and generates a new one</p>
|
||
<dl class="dl-compact">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Promise containing string</code>
|
||
<p>New invite code</p>
|
||
</p>
|
||
</dd>
|
||
</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>Yes</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="sendSeen"><span class="symbol-name">sendSeen</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing Boolean</span></span></h3>
|
||
<p>Sets the chat as seen</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#sendSeen">Chat#sendSeen</a></dd>
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p>result</p>
|
||
</dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="sendStateRecording"><span class="symbol-name">sendStateRecording</span><span class="signature"><span class="signature-params">()</span></span></h3>
|
||
<p>Simulate recording audio in chat. This will last for 25 seconds.</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#sendStateRecording">Chat#sendStateRecording</a></dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="sendStateTyping"><span class="symbol-name">sendStateTyping</span><span class="signature"><span class="signature-params">()</span></span></h3>
|
||
<p>Simulate typing in chat. This will last for 25 seconds.</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#sendStateTyping">Chat#sendStateTyping</a></dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="setAddMembersAdminsOnly"><span class="symbol-name">setAddMembersAdminsOnly</span><span class="signature"><span class="signature-params">([adminsOnly])</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||
<p>Updates the group setting to allow only admins to add members 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>adminsOnly</p>
|
||
</td>
|
||
<td>
|
||
<p>boolean</p>
|
||
</td>
|
||
<td>
|
||
<p>Yes</p>
|
||
</td>
|
||
<td>
|
||
<p>Enable or disable this option</p>
|
||
<p>Defaults to <code>true</code>.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Promise containing boolean</code>
|
||
<p>Returns true if the setting was properly updated. This can return false if the user does not have the necessary permissions.</p>
|
||
</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 class="signature-returns"> Promise containing boolean</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">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Promise containing boolean</code>
|
||
<p>Returns true if the description was properly updated. This can return false if the user does not have the necessary permissions.</p>
|
||
</p>
|
||
</dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="setInfoAdminsOnly"><span class="symbol-name">setInfoAdminsOnly</span><span class="signature"><span class="signature-params">([adminsOnly])</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||
<p>Updates the group settings to only allow admins to edit group info (title, description, photo).</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>adminsOnly</p>
|
||
</td>
|
||
<td>
|
||
<p>boolean</p>
|
||
</td>
|
||
<td>
|
||
<p>Yes</p>
|
||
</td>
|
||
<td>
|
||
<p>Enable or disable this option</p>
|
||
<p>Defaults to <code>true</code>.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Promise containing boolean</code>
|
||
<p>Returns true if the setting was properly updated. This can return false if the user does not have the necessary permissions.</p>
|
||
</p>
|
||
</dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="setMessagesAdminsOnly"><span class="symbol-name">setMessagesAdminsOnly</span><span class="signature"><span class="signature-params">([adminsOnly])</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||
<p>Updates the group settings to only allow admins to send messages.</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>adminsOnly</p>
|
||
</td>
|
||
<td>
|
||
<p>boolean</p>
|
||
</td>
|
||
<td>
|
||
<p>Yes</p>
|
||
</td>
|
||
<td>
|
||
<p>Enable or disable this option</p>
|
||
<p>Defaults to <code>true</code>.</p>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Promise containing boolean</code>
|
||
<p>Returns true if the setting was properly updated. This can return false if the user does not have the necessary permissions.</p>
|
||
</p>
|
||
</dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="setPicture"><span class="symbol-name">setPicture</span><span class="signature"><span class="signature-params">(media)</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||
<p>Sets the group's picture.</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>media</p>
|
||
</td>
|
||
<td>
|
||
<p><a href="MessageMedia.html">MessageMedia</a></p>
|
||
</td>
|
||
<td>
|
||
<p> </p>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</section>
|
||
<dl class="dl-compact">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Promise containing boolean</code>
|
||
<p>Returns true if the picture was properly updated. This can return false if the user does not have the necessary permissions.</p>
|
||
</p>
|
||
</dd>
|
||
</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 class="signature-returns"> Promise containing boolean</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">
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p><code>Promise containing boolean</code>
|
||
<p>Returns true if the subject was properly updated. This can return false if the user does not have the necessary permissions.</p>
|
||
</p>
|
||
</dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="syncHistory"><span class="symbol-name">syncHistory</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||
<p>Sync chat history conversation</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#syncHistory">Chat#syncHistory</a></dd>
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p>True if operation completed successfully, false otherwise.</p>
|
||
</dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="unarchive"><span class="symbol-name">unarchive</span><span class="signature"><span class="signature-params">()</span></span></h3>
|
||
<p>un-archives this chat</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#unarchive">Chat#unarchive</a></dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="unmute"><span class="symbol-name">unmute</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing {isMuted: boolean, muteExpiration: number}</span></span></h3>
|
||
<p>Unmutes this chat</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#unmute">Chat#unmute</a></dd>
|
||
<dt>Returns</dt>
|
||
<dd></dd>
|
||
</dl>
|
||
<div class="symbol-detail-labels"><span class="label label-async">async</span></div>
|
||
<h3 id="unpin"><span class="symbol-name">unpin</span><span class="signature"><span class="signature-params">()</span> → <span class="signature-returns"> Promise containing boolean</span></span></h3>
|
||
<p>Unpins this chat</p>
|
||
<dl class="dl-compact">
|
||
<dt>Inherited from</dt>
|
||
<dd><a href="Chat.html#unpin">Chat#unpin</a></dd>
|
||
<dt>Returns</dt>
|
||
<dd>
|
||
<p>New pin state</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.11 on January 5, 2026.
|
||
</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> |