Discord.js: If you are using the token of a user account it cannot establish websocket with it (INVALID_TOKEN_ERROR)

Created on 13 Mar 2020  Â·  6Comments  Â·  Source: discordjs/discord.js

Please describe the problem you are having in as much detail as possible:
When i use Client.login(TOKEN) on version 12.0.2 it says its invalid token, but on version 11.5.1 its totaly valid and working

Include a reproducible code sample here, if possible:

const api = require("discord.js");

const client = new api.Client();

client.on("ready", () => {
    console.log(`logged in as: ${client.user.username}#${client.user.discriminator}`);
});

client.login(USER_ACCOUNT_TOKEN);

Further details:

  • discord.js version: 12.0.2
  • Node.js version: 12.16.1
  • Operating system: Win10
  • Priority this issue should have – please be realistic and elaborate if possible: Moderate
  • [ ] I have also tested the issue on latest master, commit hash:
invalid

Most helpful comment

This is expected, v12 completely drops support for userbots, as they are against the TOS. You should be using bot tokens, not user tokens.

All 6 comments

This is expected, v12 completely drops support for userbots, as they are against the TOS. You should be using bot tokens, not user tokens.

Then im sticking to v11 lol

plus i know they are aginst the tos but im not using it to "automate" as it says in the tos, im using it with commands that i wrote so i can use (example- math command). The bot can be used by my and only me so i dont see why it would be a problem but whatever

It is against the TOS, you can't negotiate.

in the tos it says its not allowed to be used for AUTOMATION im not automating anything it doesnt say its not allowed at all

Thus im not making a self-bot but rather a tool for myself using their api

Tell this to discord and show us their answer lmao

This counts as automation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tom-barnes picture tom-barnes  Â·  3Comments

Blumlaut picture Blumlaut  Â·  3Comments

kvn1351 picture kvn1351  Â·  3Comments

Dmitry221060 picture Dmitry221060  Â·  3Comments

Alipoodle picture Alipoodle  Â·  3Comments