Open wc3717 opened 6 years ago
When I output the search results my Discord bot says [object, Object]. Here is the code if(command === "search") { var spotify = require('spotify'); let song = command[1]; spotify.search({ type: 'track', query:${song}` }, function(err, data) {
if(command === "search") { var spotify = require('spotify'); let song = command[1]; spotify.search({ type: 'track', query:
message.channel.send(`${data}`)
});
}`
A bit late but:
message.channel.send(`${JSON.stringify(data)}`);
It's a little jank and you should properly format it but for dev purposes do this
When I output the search results my Discord bot says [object, Object]. Here is the code
if(command === "search") { var spotify = require('spotify'); let song = command[1]; spotify.search({ type: 'track', query:
${song}` }, function(err, data) {});
}`