Closed SparkyTheCat1 closed 3 years ago
Hey there, how are you installing the bot?
The bot is not yet compatible with Discord.js v13 and it seems that you're trying to install v13.
Hey there, how are you installing the bot?
The bot is not yet compatible with Discord.js v13 and it seems that you're trying to install v13.
Hey! Im using nodejs, i tried installing it using npm install discord.js
You should be able to install the bot with just
npm install
Running npm install discord.js
will just install the discord.js
dependency. Whereas npm install
will install all the dependencies that the bot needs.
now i get a different error ;/ :
C:\Users\User\Discord Bot\node_modules\discord.js\src\client\Client.js:544 throw new TypeError('CLIENT_MISSING_INTENTS'); ^
TypeError [CLIENT_MISSING_INTENTS]: Valid intents must be provided for the Client.
at Client._validateOptions (C:\Users\User\Discord Bot\node_modules\←[4mdiscord.js←[24m\src\client\Client.js:544:13)
at new Client (C:\Users\User\Discord Bot\node_modules\←[4mdiscord.js←[24m\src\client\Client.js:73:10)
at Object.
}
It's obviously missing something but i have no clue what... I'm very sure I installed everything correctly.
at Object. (C:\Users\User\Discord Bot\main.js:3:16)
Are you sure you're using this bot? The entrypoint for this is src/app.js
, not main.js
.
Yes im sure, when i ran "npm init" in the cmd prompt it asked for "main" so i just named it main.js, thats what that file is.
Hmmm,
First, you don't need to run npm init
in this bot because it is already initialized. npm init
just creates a package.json
file for the project.
Secondly, this project has no main.js
file, but you're getting an error on this file, more specificaly with client creation. That's why I'm asking whether you're sure that you're on the correct project.
In any case, if you're certain it's the correct project, I would delete the whole folder and re-clone the project. Then, to install the dependencies, I recommend you do:
npm ci --only=prod
This makes sure you install the correct versions of the dependencies.
That error that you sent at the end is because you have Discord.js v13 installed, and this bot does not support it yet.
I tried it and it worked! thanks for your time and help!
Alright, I'm glad it worked! :)
Im having issues with installing discord.js on my discord bot, does anyone know how to resolve this issue?
it keeps giving this error:
npm WARN notsup Unsupported engine for discord.js@13.1.0: wanted: {"node":">=16.6.0","npm":">=7.0.0"} (current: {"node":"14.17.6","npm":"6.14.15"}) npm WARN notsup Not compatible with your version of node/npm: discord.js@13.1.0 npm WARN notsup Unsupported engine for @discordjs/builders@0.5.0: wanted: {"node":">=14.0.0","npm":">=7.0.0"} (current: {"node":"14.17.6","npm":"6.14.15"}) npm WARN notsup Not compatible with your version of node/npm: @discordjs/builders@0.5.0 npm WARN discord-bot@1.0.0 No description npm WARN discord-bot@1.0.0 No repository field.
Any help would be appreciated