You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 3, 2021. It is now read-only.
Thedark1337 edited this page Feb 11, 2017
·
2 revisions
getHistory([callback])
Gets the room's history of songs played (50 in total)
NOTE: in PlugAPI versions greater than 5 callback is optional, previous versions require it
Parameters
callback function (optional)
Callback function to be called with data from server.
Returns
An array of objects that represents the previous 50 songs that have been played.
Example
//without callback (only works in PlugAPI versions greater than 5)consthistory=bot.getHistory();console.log(history);//with callbackbot.getHistory(function(data){// data is an array of objects that can be iterated});