Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bot.on("ready", async music => {
- function play(){
- let VC = bot.channels.get("535172887737401350");
- VC.join()
- .then(connection => {
- const dispatcher = connection.playFile(`./audio/music`+ randint(66) +`.mp3`);
- dispatcher.on("end", end => {
- play()
- });
- })
- .catch(console.error)
- };
- play()
- setInterval(function () {
- var date = new Date()
- if(date.getMinutes() == 01 && date.getSeconds() == 10){
- let VC = bot.channels.get("535172887737401350");
- VC.join()
- .then(connection => {
- const dispatcher = connection.playFile(`./audio/cd.mp3`);
- console.log("I am here")
- dispatcher.on("end", end => {
- dispatcher.end()
- play()
- });
- })
- .catch(console.error)
- };
- }, 600);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement