Example #1
0
    Spotify.getState(function (err, state) {
        if (state.state != 'playing') {
            bot.reply(message, 'Not currently playing...');
            return;
        }

        Spotify.pause(function () {
            bot.reply(message, 'Pausing playback...');
        });
    });
Example #2
0
exports.pause = function(callback) {
	spotify.pause(function(err, result) {
		if (err) {
			console.error(exports.__NAME__, err);
			if (callback) callback(null);
			return;
		}

		if (callback) callback(result);
	});
};
Example #3
0
app.post("/pause", function (req, res) {
    spotify.pause(function () {
        res.send(200, "paused");
    });
});
Example #4
0
voiceBox.addResponder(/Stop/i, function(){
  spotify.pause(function() {});
});
Example #5
0
	        setTimeout(function(){
	            spotify.pause(function(){
	                console.log("Done.");
	            });
	        }, 11500);