title: How To Make A DiscordJS Selfbot Join A Server Without The Use Of Discord Invites Api?
body: <p>First of all, I know that Self bots are against the TOS of Discord. So Please Don't Say That.</p>
  <p>I have been trying to make a discord self bot to join a server using an Invite link.
  So the most known method for this was using the discord invites API with a XMLHttpRequest. That Actually Works. But after that by a few seconds the account asks for a phone verification number.
  Which I think due to the changes Discord had made with their API.</p>
  <p>Code:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const x = new XMLHttpRequest();
          x.open('POST', `https://discordapp.com/api/v7/invites/${invite}`);
          x.setRequestHeader('Authorization', "token");
          x.send();</code></pre>
  </div>
  </div>
  </p>
  <p>So I was thinking about something else. Like making a request to the link of the invite itself, and inserting the discord token in it. Just like what does this does. But instead of using the API Directly We'd Just Use The &quot;discord.gg/link&quot; Thing.</p>
  <p>Is this possible? And If it is How can it be made. I thought about puppeteer but it doesn't go really well with discord.js.</p>
  <p>Thanks in advance.</p>