Whenever I open my Node.JS program it decides to close on enter. Could anyone help me, I would appreciate it.
const request = require("request");
function nCheck() {
let output = "";
let size = "4"; //size of name to check for!
let possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
for(let i = 0; i < size; i++) {
output += possible.charAt(Math.floor(Math.random() * possible.length));
}
request(`https://www.roblox.com/UserCheck/DoesUsernameExist?username=${output}`, function(error, responce, body) {
if(error) return console.log("WARNING: SOMETHING WENT WRONG!");
let name = JSON.parse(body);
if(name.success === true) {
console.log(`${output} is **[TAKEN]**`);
} else if(name.success === false) {
console.log(`${output} is --[USEABLE]--`);
}
});
setTimeout(nCheck, 1);
};
setTimeout(nCheck, 1);
via LyfeRapz
No comments:
Post a Comment