Advertisement
Guest User

Untitled

a guest
Jan 19th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. bot.on("ready", async music => {
  2.   function play(songID){
  3.     let VC = bot.channels.get("535172887737401350");
  4.     VC.join()
  5.       .then(connection => {
  6.         let date;
  7.         function execute(){
  8.           date = Date();
  9.         };
  10.         function run() {
  11.           setInterval(execute, 500);
  12.         };
  13.         run()
  14.         const dispatcher = connection.playFile(`./audio/music`+ songID +`.mp3`);
  15.         if(date.getMinutes() == 20 && date.getSeconds() == 25){
  16.             dispatcher.end()
  17.             const dispatcher = connection.playFile(`./audio/cd.mp3`);
  18.             console.log("RAN")
  19.             dispatcher.on("end", end => {play(randint(66))});
  20.         };
  21.  
  22.         dispatcher.on("end", end => {
  23.           play(randint(66))
  24.         });
  25.       })
  26.       .catch(console.error)
  27.   };
  28.   play(randint(66))
  29. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement