I get the song with the request from the site. But when I add the !song command in the form of writing the error part. Do you have any suggestions about this?
Code’s
request({url: 'https://groke.se/twitch/spotify/APİ NUMBER’S, json: true}, function(err, res, json) {
if (err) {
throw err;
}
console.log(json);
client.on(‘message’, async (channel, userstate, message, self) => {
// Don't reply to messages from self or without the "!" as the first char
if (self || message[0] !== '!') {
return;
}
// Run the !song command
// Output items
Console.log("Çalan Şarkı : ",json);
}, function(err) {
console.log('Şuan Şarkı çalmıyor..', err);
});