title: Check if a music (streamed from youtube) is playing on bot or not
body: <p>I just created a working queue command, but now Im stuck at editing the play command</p>
  
  <p>I tried to make it that if a music is playing, the play command will only push the query to queue and wait for the music to finish playing then shift the queue to play next.</p>
  
  <p>Im stuck at how to check whether the bot is still streaming a music from internet or not.</p>
  
  <pre class="lang-js prettyprint-override"><code>//push function, stream and streamOptions is above from here
  if (/*check whether a music is playing = false*/) {
     function dispatcher() {
         connection.playStream(stream, streamOptions)
         dispatcher.on('end', function () {
         lst.shiftlist(); //shift the queue
         if (lst.urllist[0]/*check if queue[0] contains*/) {
            dispatcher();
         }
         else {
            message.channel.send('Queue empty!');
            return;
         }
         })
     }
  }
  else if (/*check whether a music is playing = true*/) {
       message.channel.send('Added to queue!')
       console.log(url)
  }
  </code></pre>
  
  <p>is it possible to check if the bot is still playing a stream or not? or is there any else method i can use for this problem?</p>