add error check

This commit is contained in:
KGT1 2020-09-30 17:37:26 +02:00
parent 5eda09d559
commit 26e2a16f98

View File

@ -44,7 +44,11 @@ function startUpate (callback) {
} }
function updateCurrentSongMessage (title, artist, imageURL, itemURL, ticksLength, playlistIndex, playlistLenth) { function updateCurrentSongMessage (title, artist, imageURL, itemURL, ticksLength, playlistIndex, playlistLenth) {
iapm.updateCurrentSongMessage(title, artist, imageURL, itemURL, ticksLength, playlistIndex, playlistLenth); if (typeof iapm !== "undefined") {
iapm.updateCurrentSongMessage(title, artist, imageURL, itemURL, ticksLength, playlistIndex, playlistLenth);
} else {
throw Error("No Interactive Message Found");
}
} }
module.exports = { module.exports = {