aiko-chan-ai / discord.js-selfbot-v13

An unofficial discord.js fork for creating selfbots
https://discordjs-self-v13.netlify.app
GNU General Public License v3.0
817 stars 171 forks source link

DiscordAPIError occur when trying to change username #724

Closed Aboshxm2 closed 9 months ago

Aboshxm2 commented 1 year ago

Which package has the bugs?

The core library

Issue description

The output of the sample code below:

a_mly is ready!
C:\Users\adnan\Desktop\abdullah\username-sniper\node_modules\discord.js-selfbot-v13\src\rest\RequestHandler.js:401
      throw new DiscordAPIError(data, res.status, request);
            ^

DiscordAPIError: You need to update your app to perform this action.
b2b02ab5-7dae-4d6f-830e-7b55634c888b
hcaptcha
Zvna+rrLQsFZ7vMBUQtPMrbaWTZNBigr0rAv1wgd2cIXQOd515uFz8GCbVVZXEoERgJHUroFZHFMqNYnGlO5OTMe7WyeWyzCPwSytT90VjGZ1RocxtmWQ4foIUkAnWXThL8vApnbDN2Tc/jAq3jwnkB0E2oGwVZCtKFDNbDe
IkZZVmFPRzJLc0NOUFhEeU5LVnFCZzVIRGZIZUlpZVlYQkVhUGZZbCtTekRuYU9ZR3JEWkRmbnE1TUpNNFEvbUtVTXAvUVE9PUxlbEM5VjBrZWE5Y1RBWjMi.ZJWAPg.4mI05Q2zJnszg57Lu4_XR4ujaQI
    at RequestHandler.execute (C:\Users\adnan\Desktop\abdullah\username-sniper\node_modules\discord.js-selfbot-v13\src\rest\RequestHandler.js:401:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async RequestHandler.push (C:\Users\adnan\Desktop\abdullah\username-sniper\node_modules\discord.js-selfbot-v13\src\rest\RequestHandler.js:62:14)
    at async ClientUser.edit (C:\Users\adnan\Desktop\abdullah\username-sniper\node_modules\discord.js-selfbot-v13\src\structures\ClientUser.js:148:18) {
  method: 'patch',
  path: '/users/@me',
  code: undefined,
  httpStatus: 400,
  captcha: {
    captcha_key: [ 'You need to update your app to perform this action.' ],
    captcha_sitekey: 'b2b02ab5-7dae-4d6f-830e-7b55634c888b',
    captcha_service: 'hcaptcha',
    captcha_rqdata: 'Zvna+rrLQsFZ7vMBUQtPMrbaWTZNBigr0rAv1wgd2cIXQOd515uFz8GCbVVZXEoERgJHUroFZHFMqNYnGlO5OTMe7WyeWyzCPwSytT90VjGZ1RocxtmWQ4foIUkAnWXThL8vApnbDN2Tc/jAq3jwnkB0E2oGwVZCtKFDNbDe',
    captcha_rqtoken: 'IkZZVmFPRzJLc0NOUFhEeU5LVnFCZzVIRGZIZUlpZVlYQkVhUGZZbCtTekRuYU9ZR3JEWkRmbnE1TUpNNFEvbUtVTXAvUVE9PUxlbEM5VjBrZWE5Y1RBWjMi.ZJWAPg.4mI05Q2zJnszg57Lu4_XR4ujaQI'
  },
  requestData: {
    json: { username: 'vkdsfjeksf', password: 'I removed my password from here' },
    files: []
  },
  retries: 0
}

Code sample

require('dotenv').config();

const { Client } = require('discord.js-selfbot-v13');
const client = new Client({
    // See other options here
    // https://discordjs-self-v13.netlify.app/#/docs/docs/main/typedef/ClientOptions
    // All partials are loaded automatically
});

client.on('ready', async () => {
  console.log(`${client.user.username} is ready!`);

  client.user.setUsername("vkdsfjeksf", process.env.password)
})

client.login(process.env.token);

Package version

latest github commit on the main branch

Node.js version

18.16.1

Operating system

Windows 11

Priority this issue should have

Low (slightly annoying)

Checklist

Additional Information

No response

aiko-chan-ai commented 1 year ago

captcha ?

Aboshxm2 commented 1 year ago

captcha ?

yep

aiko-chan-ai commented 1 year ago

I can't reproduce

Aboshxm2 commented 1 year ago

I can't reproduce

Did you use available (not taken) username?

aiko-chan-ai commented 1 year ago

maybe

Turkidev commented 1 year ago

same issue with changing the username from the api directly with a valid username

Response: { captcha_key: [ 'You need to update your app to perform this action.' ], captcha_sitekey: 'a9b5fb07-92ff-493f-86fe-352a2803b3df', captcha_service: 'hcaptcha', captcha_rqdata: 'DhZD3PLEsbn8MaZeM/t96HscumbtYiyg+jZrxmHJ/8F8FEGlVW+Adw2DZyyoS4HayO/ND9NDYv5PU/Rtshts8HIdWd7bCKr6FxxH+PVI0CBJd6GYK9eVXJS33ck=wDYzXjwQDJb8IhRA', captcha_rqtoken: 'InZwNzV0ZHFYbzhLVzBLRVMweXQyM3RxMkVRdEpJa3M3bmtxUWRNU3F4c1ZLVUNKMXJwTUZLTVRYZFRnd040aFBZendCUVE9PW5CelFrMXhLa0FLYVJRUWoi.ZK_dJQ.fYC55loTmLfxf7wF8yuimazdq-I' }