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
806 stars 170 forks source link

Error [INVALID_INTENTS] #248

Closed ghost closed 2 years ago

ghost commented 2 years ago

Which package has the bugs?

The core library

Issue description

I've been using this library for a while but for some reason it started throwing Invalid Intents error

`Error [INVALID_INTENTS]: Invalid intent provided for WebSocket intents. at WebSocketManager.createShards (d:\Freelance\StockTwits Relay Bot\node_modules\discord.js-selfbot-v13\src\client\websocket\WebSocketManager.js:258:15) at async Client.login (d:\Freelance\StockTwits Relay Bot\node_modules\discord.js-selfbot-v13\src\client\Client.js:369:7) {

}`

Code sample

const { Client } = require("discord.js-selfbot-v13");
const client = new Client();

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

client.login("mytoken");

// I also tied providing some intents but still no luck

// const client = new Client({
//   intents: ["GUILDS", "GUILD_MEMBERS", "GUILD_MESSAGES"],
// });

Package version

discord.js-selfbot-v13@2.5.0

Node.js version

nodejs - v16.14.2 , typescript - 4.7.4

Operating system

Windows

Priority this issue should have

High (immediate attention needed)

Checklist

Additional Information

My code was working last night, but when I restarted it in this morning it stopped working, I was using discord.js-selfbot-v13 version 2.4.6 , I also tried upgrading it to the latest version i.e 2.5.0 but I'm still getting the same INVALID_INTENTS error.

ghost commented 2 years ago

Apparently discord updated all our selfbot tokens, I forgot to check the tokens, I regenerated them and the bot started working.