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 toolkit9mo 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👑9mo ago
what is your djs version? you selected multiple versions using the tags
d.js docs
d.js docs9mo 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!');
murderfull
murderfullOP9mo ago
13
-Carlos👑
-Carlos👑9mo ago
your exact version
- What's your exact discord.js npm list discord.js and node node -v version?
NyR
NyR9mo ago
Then why add v14 tag? GatewayIntentBits is for v14
d.js docs
d.js docs9mo ago
:property: (static) Intents.FLAGS Numeric WebSocket intents. All available properties: (more...)
NyR
NyR9mo ago
Use this ^
murderfull
murderfullOP9mo ago
ok it's not 13 its 12.3.5
-Carlos👑
-Carlos👑9mo ago
djs v12 is no longer supported
murderfull
murderfullOP9mo ago
okay 13.6.0 is supported right
-Carlos👑
-Carlos👑9mo ago
yes
murderfull
murderfullOP9mo ago
is it a stable option to choose to upgrade to
-Carlos👑
-Carlos👑9mo ago
i would recommend using 13.17.1 if you really want to use v13 or just update to the latest v14 version
murderfull
murderfullOP9mo ago
ok
Want results from more Discord servers?
Add your server