Event: ADVANCE

Follow

Comments

5 comments

  • Avatar
    xXSKHXx

    Um, Hi. Im currently trying to create a little bot for my community, I would like to know, how would I use this to have it display the current songs info after the previous one ends?

  • Avatar
    Colin

    @xXSKHXx On the Advance event:
    var media = API.getMedia();
    API.sendChat('Now playing: '+media.title+' — '+media.author);

  • Avatar
    Nawaxnawax

    Hello =) I'd like to know how I can use this event and the JSON object to show the song's score at the end of it, in the chat. Someone could tell me please ?
    I used API.getHistory() until now, but this is not working most of the time, and it shows the score of the wrong song.
    I'm sorry for my bad English.

  • Avatar
    xXSKHXx

    @Colin Thank you! I know its really late to say it, but I have already found out how to do this and have started making the bot into a more world-wideish kinda thing, ya with me so far?

    To see what I mean by world-wideish, this is the github link when I update the code:
    https://github.com/xXSKHXx/PlugDJBot/blob/master/PlugDJBot.js

  • Avatar
    DCV

    @Nawaxnawax ,
    Try using API.getScore() to do this. To get the woots, it's API.getScore().positive , mehs are API.getScore().negative and grabs are API.getScore().grabs . Here is a little code snippet for you, it sends the score of the song right when it finishes: http://pastebin.com/EX43WhwX
    Cheers,
    DCV

Please sign in to leave a comment.

Powered by Zendesk