26 Replies
- 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!?
You're defining
Discord.Intents.FLAGS
, you should instead be importing GatewayIntentBits
and doing GatewayIntentBits.DirectMessages
(guessing since I can't see the whole code, just 1 line)
However, if you want to keep it your current way, FLAGS
wouldn't be all caps...iirc it's all lowercase
But again, this is only a guess without seeing the code
Or knowing what version of DJS you're on
I fixed my typo
GatewayIntentBits
it looks like you're using v13 code
did you write this?
no
do you know how to code at all?
yes a little
if the code is already done in v13 you might want to take a look at this to see how to upgrade it https://discordjs.guide/additional-info/changes-in-v14.html
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
How do I know which version I'm in?
that code looks like v13, but you installed v14 so it won't work
Determining your discord.js version:
-
npm list discord.js
- Make sure you use the right documentation for your installed version (selector on the left)
Then you don't have any version of DiscordJS installed
can you
npm list -g discord.js
https://github.com/xxerick/CrowBot-Remade/blob/main/index.js
I'm guessing this is the bot...this is v12
GitHub
CrowBot-Remade/index.js at main · xxerick/CrowBot-Remade
𓄿 CrowBot Remade - It's a multipurpose bot which is a remade of a py discord bot which is selled for 5e but this is in js ! - xxerick/CrowBot-Remade
:Thonk:

big yikes

Thats still v12/13 code
if you have installed djs at all
but considering this repo uses v12, i doubt you're gonna be anything witg it
yeah this repo uses some questionable packages to say the least, we won't be able to give you support with it
and that's excluding the v12 (2 major versions behind) djs version
and whatever "discord.js.old" is
Unknown User•2d ago
Message Not Public
Sign In & Join Server To View
this should give a hint I don't know and it's not from djs