repeat: udpate docs

This commit is contained in:
Androz2091 2020-02-02 11:20:21 +01:00
parent d2fde09378
commit 374da86cd7
2 changed files with 32 additions and 6 deletions

View file

@ -2042,7 +2042,7 @@
<h4 class="name" id="setRepeatMode"><span class="type-signature"></span>setRepeatMode<span class="signature">(enabled)</span><span class="type-signature"> &rarr; {Promise.&lt;Void>}</span></h4>
<h4 class="name" id="setRepeatMode"><span class="type-signature"></span>setRepeatMode<span class="signature">(guildID, enabled)</span><span class="type-signature"> &rarr; {Promise.&lt;Void>}</span></h4>
@ -2122,6 +2122,32 @@
<tbody>
<tr>
<td class="name"><code>guildID</code></td>
<td class="type">
<span class="param-type"><code>string</code></span>
</td>
<td class="description last">
</td>
</tr>
<tr>
<td class="name"><code>enabled</code></td>

View file

@ -114,9 +114,9 @@ client.player.nowPlaying(guildID);
// Current song will be repeated indefinitely
client.player.setRepeatMode(true);
client.player.setRepeatMode(guildID, true);
// Current song will no longer be repeated indefinitely
client.player.setRepeatMode(false);
client.player.setRepeatMode(guildID, false);
</code></pre>
<h3>Event messages</h3>
<pre class="prettyprint source lang-js"><code>client.player.getQueue(guildID)
@ -338,7 +338,7 @@ client.player.setRepeatMode(false);
<h3>Repeat</h3>
<p>To repeat the current song, use the <code>client.player.setRepeatMode()</code> function.</p>
<p><strong>Usage:</strong></p>
<pre class="prettyprint source lang-js"><code>client.player.setRepeatMode(boolean);
<pre class="prettyprint source lang-js"><code>client.player.setRepeatMode(guildID, boolean);
</code></pre>
<p><strong>Example</strong>:</p>
<pre class="prettyprint source lang-js"><code>client.on('message', async (message) => {
@ -348,7 +348,7 @@ client.player.setRepeatMode(false);
if(command === 'enable-repeat'){
// Enable repeat mode
client.player.setRepeatMode(true);
client.player.setRepeatMode(message.guild.id, true);
// Get the current song
let song = await client.player.nowPlaying(message.guild.id);
message.channel.send(`${song.name} will be repeated indefinitely!`);
@ -356,7 +356,7 @@ client.player.setRepeatMode(false);
if(command === 'disable-repeat'){
// Disable repeat mode
client.player.setRepeatMode(false);
client.player.setRepeatMode(message.guild.id, false);
// Get the current song
let song = await client.player.nowPlaying(message.guild.id);
message.channel.send(`${song.name} will no longer be repeated indefinitely!`);