peol / node-spotify

A very simple node.js library for the Spotify REST API
42 stars 17 forks source link

Output Search Info #13

Open wc3717 opened 6 years ago

wc3717 commented 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) {

message.channel.send(`${data}`)

});

}`

WombleWoo7547 commented 3 months ago

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