title: discord.js playing audio on multiple servers
body: <p>I made a test test bot for discord.js using Node.js / ffmpeg, to play a radio station in a channel on discord and there are no problems there, however i was thinking about how it would stream the same station to multiple servers/channels efficiently.</p>
  
  <p>For example, if I am playing it on "Discord server one": </p>
  
  <pre><code>var voiceChannel = message.member.voiceChannel;
      voiceChannel.join().then(connection =&gt; {
      console.log("joined channel");
      const dispatcher = connection.playArbitraryInput('http://philae.shoutca.st:8950/live', { volume: 0.5 });
  
      dispatcher.on("end", end =&gt; {
        console.log("left channel");
        voiceChannel.leave();
       });
          }).catch(err =&gt; console.log(err)); 
  </code></pre>
  
  <p>However if i want to play it on another server that my bot is a member of, do i need to create the audio stream again?</p>
  
  <p>If so that kinda sux. My bot would have to encode the stream seperatly for each instance?</p>
  
  <p>I would like to know if there is any way i can reuse the audio stream and restream it so that if I had my bot in 100 channels its only one download instance of the stream and 100 uploads</p>
  
  <p>I haope i am making sense but let me make some fake code to try help explain:</p>
  
  <p>lets say instead i could do something like this:</p>
  
  <pre><code>let cachedAudioStream = cacheArbitraryInput('http://philae.shoutca.st:8950/live', {});
  </code></pre>
  
  <p>then for every outgoing instance:</p>
  
  <pre><code>connection1.playArbitraryInput(cachedAudioStream, { volume: 0.5 });
  connection2.playArbitraryInput(cachedAudioStream, { volume: 0.8 });
  connection3.playArbitraryInput(cachedAudioStream, { volume: 1 });
  </code></pre>
  
  <p>and so on</p>
  
  <p>Thanks</p>