Closed dayxhep closed 8 years ago
Hello here, Following the new syntax i have some troubles with the dispatcher catching In fact using .then( dispatcher => { does nothing (not going in the .then())
.then( dispatcher => {
.then()
self.bot.user.setStatus('online') .then(()=>{ self.bot.user.setGame(self.playing.title) .then(()=>{ console.log("Updated tittle"); self.bot.voiceConnection.playStream(stream, vcOptions) .then( dispatcher => { console.log(dispatcher); /*self.dispatcher = dispatcher; self.bot.onPlay = true; addMsg.target.sendMessage(npMsg).then(()=>{ if (cb !== undefined) cb(); }).catch(err => {throwErr(err)});*/ }).catch((e)=>{throwErr(e)}); }).catch((e)=>{throwErr(e)}); }).catch((e)=>{throwErr(e)});
The music is playing and i got "Updated tittle" in the console
Edit, even by using :
self.bot.voiceConnection.playStream(stream, vcOptions) .then(()=>{ console.log("FIRE !"); }).catch((e)=>{throwErr(e)});
The anonymous function is the .then() is not fired.
playStream does not return a Promise. It just returns the dispatcher.
Hello here, Following the new syntax i have some troubles with the dispatcher catching In fact using
.then( dispatcher => {
does nothing (not going in the.then()
)The music is playing and i got "Updated tittle" in the console
Edit, even by using :
The anonymous function is the
.then()
is not fired.