Sopur / Discord-user-bots

Working discord user bots library.
MIT License
81 stars 35 forks source link

account-create.js not working #47

Closed anirual closed 1 year ago

anirual commented 1 year ago

Hey, i wanted to create a discord account with the account-create.js example and encountered this error:

const factory = new Discord.AccountFactory()
TypeError: Discord.AccountFactory is not a constructor

This is the code i ran:

const Discord = require("discord-user-bots");

// captcha.guru is a capcha solving service.
// This is a wrapper I made for it.
// `npm i captchaguru` to install
const Guru = require("captchaguru");
const factory = new Discord.AccountFactory();

// Config
const proxy = "85.214.81.21:3128";
const proxyType = "HTTP";
const accountName = "tuismqgi";

// Solve captcha callback
async function solveCaptcha(captchaInfo) {
    const solver = new Guru("captcha.guru API token goes here.", captchaInfo.service, captchaInfo.siteKey, captchaInfo.siteURL, proxy, proxyType);
    return solver.solve();
}

void (async function main() {
    // Returns token on success
    const token = await factory.createAccount(accountName, solveCaptcha, `${proxyType.toLowerCase()}://${proxy}`);
    console.log("Created account: ", token);

    // Attempt to login to the newly created account
    const client = new Discord.Client(token);
    client.on.ready = function () {
        console.log("Created account online!");
    };
})();

I am using repl.it with node 18.12.1 and npm 8.19.2 . I installed all npm packages.

(Im in holidays thats why i am using repl.it)

Sopur commented 1 year ago

I'm sorry, but account creation isn't currently finished. The example file was left in during development.