intents issue

so this is my code const { token, default_prefix, color } = require("./config.json"); const Discord = require("discord.js"); require("@haileybot/sanitize-role-mentions"); const client = new Discord.Client({ disableMentions: "everyone", fetchAllMembers: true, partials: ['MESSAGE', 'REACTION'], intents: [ Discord.GatewayIntentBits.GuildMessages, Discord.GatewayIntentBits.MessageContent, ], }); const mongoose = require('mongoose') /mongoose.connect('mongo url', { useUnifiedTopology: true, useNewUrlParser: true }).then(console.log('connected to mongoose'))/ const jointocreate = require("./jointocreate"); jointocreate(client); client.commands = new Discord.Collection(); client.aliases = new Discord.Collection(); client.db = require("quick.db"); module.exports = client; ["command", "event"].forEach(handler => { require(./handlers/${handler})(client); }); Discord.Constants.DefaultOptions.ws.properties.$browser = "Discord Android" client.login(token) and it's giving me this error
No description
15 Replies
d.js toolkit
d.js toolkit•3mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
-Carlos👑
-Carlos👑•3mo ago
what is your djs version? you selected multiple versions using the tags
d.js docs
d.js docs•3mo ago
Codeblocks: ```js const Discord = require("discord.js"); // further code ``` becomes
const Discord = require("discord.js");
// further code
const Discord = require("discord.js");
// further code
Inline Code: `console.log('inline!');` becomes console.log('inline!');
soy
soy•3mo ago
13
-Carlos👑
-Carlos👑•3mo ago
your exact version
- What's your exact discord.js npm list discord.js and node node -v version?
NyR
NyR•3mo ago
Then why add v14 tag? GatewayIntentBits is for v14
d.js docs
d.js docs•3mo ago
:property: (static) Intents.FLAGS Numeric WebSocket intents. All available properties: (more...)
NyR
NyR•3mo ago
Use this ^
soy
soy•3mo ago
ok it's not 13 its 12.3.5
-Carlos👑
-Carlos👑•3mo ago
djs v12 is no longer supported
soy
soy•3mo ago
okay 13.6.0 is supported right
-Carlos👑
-Carlos👑•3mo ago
yes
soy
soy•3mo ago
is it a stable option to choose to upgrade to
-Carlos👑
-Carlos👑•3mo ago
i would recommend using 13.17.1 if you really want to use v13 or just update to the latest v14 version
soy
soy•3mo ago
ok