title: Discord Music bot - the song i play stopped 10-20 seconds before the end so i added highWaterMark and now the song barely plays at all
body: <p>So basically i had <a href="https://stackoverflow.com/questions/62135569/my-discord-music-bot-stops-songs-20-seconds-before-it-is-meant-to">this issue</a> and i got given a &quot;solution&quot; but it didn't work, so i found a fix and that was adding highWaterMark to my code so the stream stays open longer or whatever idk, so this is what my code looks like currently</p>
  <pre><code>    const dispatcher = serverQueue.connection.play(ytdl(song.url, {
          filter:&quot;audioonly&quot;,
          highWaterMark: 1&lt;&lt;25 })
          .on(&quot;finish&quot;, () =&gt; {
              const shiffed = serverQueue.songs.shift();
              if (serverQueue.loop === true) {
                  serverQueue.songs.push(shiffed);
              };
              play(guild, serverQueue.songs[0]);
          })
          .on(&quot;error&quot;, error =&gt; console.error(error)));
      dispatcher.setVolume(serverQueue.volume / 100);
  </code></pre>
  <p>but now my issue is that the song will play for like 10 seconds then just stop, i have no idea why this just made my issue worse because for everyone i seen that used this solution it worked perfectly.</p>