Update lastfm.mjs

This commit is contained in:
Flummi 2018-02-05 13:00:15 +00:00
parent b4784387ba
commit 89cda0e25c

View File

@ -22,7 +22,11 @@ export default bot => {
track: `${track.artist["#text"]} - ${track.name}`,
playing: track["@attr"] ? true : false
};
e.reply( `[b]${info.user}[/b] is listening to [b]${info.track}[/b]` );
if(info.playing)
e.reply( `[b]${info.user}[/b] is listening to [b]${info.track}[/b]` );
else
e.reply( `[b]${info.user}[/b] is not listening to anything. They last listened to [b]${info.track}[/b]` );
})
.catch(err => {
console.log(err);