I'm making a bot where if you do /run it will make an api request and start a web based action but i need to run the page from a node.js command what i have currently is
var request = require('request');
request('http://example.com/?ip=xxx-xxx-xxx', function (error, response,
body) {
if (!error && response.statusCode == 200) {
console.log(body) // Print the google web page.
}
})
but this doesn't seem to work...
How would I go about doing this ?
EDIT: It was cloudflare blocking access