discorddiscord.js

Discord JS user botting


Logging in with a user account.

Ok so, I noticed that it's extremely easy to use a bot with Python on Discord, but it's not possible on Node JS? I mean, there must be a way to log in to a user account with Node JS, anybody know?

Error

Whenever trying to log in to a user account with discord.js, it replies with this:

Error [TOKEN_INVALID]: An invalid token was provided.

I'm pretty curious; I'd like to make something that would react with "uwu" every time someone says "uwu".


Solution

  • You can use https://github.com/botkalista/discord.js.userbot

    const Discord = require('discord.js');
    const allowUserBotting = require('discord.js.userbot');
    const client = new Discord.Client();
    allowUserBotting(client);
    client.login('YOUR USER TOKEN HERE');