I can't get my bot online it just says referenceError : GatewayIntentBits is not defined at object . then my pc desktop one drive then the folder name and it says src/index.js : 2:32 then it runs and comes up with node.js v18.17.1
To anyone still struggling with the invalid token error, move .env to the main folder. it wont work properly when its inside the same folder as your index.js file. Hope this helps!
4:11 you dont need to paste it into the chat, you can just paste it into your web browser and invite it there. This is just for information, i am not suggesting anything to persuade your choice.
Great tutorial! Just one tip dont use requiere anymore in js, use mjs files and use imports. I know sometimes its hard getting used to it, but its the new thing!
Thanks for watching! And yeah, you do bring up a good point regarding using 'imports' with ECMAScript modules (ESM) as it's the new thing in JS. However, in the tutorial, I used 'require' since I find it more conventional and compatible for Discord.js-related projects.
Error: Cannot find module 'C:\Users\eliga\Desktop\code\code1\index.js'. Please verify that the package.json has a valid "main" entry just got another error: TypeError [ClientMissingIntents]: Valid intents must be provided for the Client. Please help
Hello! I've got a question; whenever i do the final step and "edit" the program after we already made the bot online, it's getting offline. I can't seem to find an answer as to why this is happening, as i followed every step correctly.
When I do the part at time stamp 10:10 it says "node : The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + node . + ~~~~ + CategoryInfo : ObjectNotFound: (node:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException" can I get sum help😐.
i had the same error and all i did was save everything and restart the application it seems that when i opened visual studio code , node was still installing
When I type “node .” In the terminal it just brings me right back to the folder, it doesn’t say “Bot is ready!” and it doesn’t give me an error code either :( idk what to do
late reply, sorry. hopefully u got it fixed now, but the solution is to restart your computer to fully install node.js, then try running it again. worked for me
I'm being stuck at this error Please verify that the package.json has a valid "main" entry whenever I try to save it I just follow the steps in the video I don't know if I'm doing it right
My one is saying referenceError : GatewayIntentBits is not defined at object . then my pc desktop one drive then the folder name and it says src/index.js : 2:32 then it runs and comes up with node.js v18.17.1
I hope if you may can explain whats mean const and those stuff I mean in a tutorial I want to understand what am I doing to learn about that but ill follow you for more tutorials anyway thanks.
I can tell this is a good tutorial, but I got stuck at 5:10. Every time I put in cd desktop and my file names into command prompt, it always says my system can't find the path specified. I don't know if it's just because I'm using Windows and not iOS like you, or I'm just missing something obvious.
Hey there. Do you get the path can't be found error when typing "cd desktop"? If so, this is most likely because your "Desktop folder" exists inside of another location, so you would need to 'cd'' into the original location first. You can quickly see where your Desktop folder is located by creating a new file on your Desktop and then right-clicking on "properties" and seeing the file location of your Desktop. Hope this helps!
Hello, make sure you correctly copied your token from your index.js file to your .env file and accurately updated your index.js file with the token variable.
i did this tutorial 12 times wondering why it kept saying 'Please verify package.json has a valid "main" entry' only to realise just now i put scr instead of src for the folder and src for the package.json. I have no idea how i did this 12 times in a row
I know this was uploaded a while ago but I have inserted all of the index. js and when i run the command "node . I get... SyntaxError: Unexpected token '{' This was done on discord js 14.12.1 however you did it on 14.11 so either the update had muddled the code up or I did something wrong. EDIT: I figured out the problem!
My one is saying referenceError : GatewayIntentBits is not defined at object . then my pc desktop one drive then the folder name and it says src/index.js : 2:32 then it runs and comes up with node.js v18.17.1
No, the last set of code simply outputs to the console the bot's user tag. To make the bot online 24/7, you would need to run your program locally (on your computer) all the time or host it on a cloud platform like Replit.
" node : The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + node . + ~~~~ + CategoryInfo : ObjectNotFound: (node:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException " can someone help me out at the end i just copied him in eve but idk whats the problem here pls..
This error is indicative that you have either not installed Node.js or have installed it in the wrong path. If you have already installed Node.js, try uninstalling it and reinstalling it (the LTS version) and choose the option along the lines of "add to PATH" during installation. This should resolve the issue, hope this helps!
Hey there, Upon creating the terminal and entering "node .", i get this error message... node:internal/process/promises:289 triggerUncaughtException(err, true /* fromPromise */); ^ ConnectTimeoutError: Connect Timeout Error at onConnectTimeout (C:\Users\Ryan\Downloads\ODDS ON ode_modules\undici\lib\core\connect.js:182:24) at C:\Users\Ryan\Downloads\ODDS ON ode_modules\undici\lib\core\connect.js:129:46 at Immediate._onImmediate (C:\Users\Ryan\Downloads\ODDS ON ode_modules\undici\lib\core\connect.js:168:33) at process.processImmediate (node:internal/timers:478:21) { code: 'UND_ERR_CONNECT_TIMEOUT' } Node.js v20.8.1 Please help!!!
the bot will not work until u turn on ur relit application for tht u need to find and use a 24/7 mod to make it work without being offline which is pretty hard to do. hope it helped. :)
You can use cloud/cloud-based platforms (such as Replit or Heroku) to run and host your bot and keep it always online. It's worth noting though, that Replit scripts usually time out after 1 hour of inactivity causing your bot to go offline. To fix that, you can set up an HTTP web server (through an application such as UpTime Robot) that will send constant pings to your Replit script every 5 minutes, keeping your bot always online. Hope this helps!
Hello! I got a question. When I tried installing node js, 5 options popped up in the node js window and i didn't know which to install: "Node.js runtime" "corepack manager" "npm package manager" (the one I tried but didn't work) "Online documentation shortcuts" and "Add to PATH" WHICH ONE OF ALL THE ABOVE DO I HAVE TO INSTALL??? Thanks! Have a great day!
Hello. After following the tutorial. i got this error. node:internal/process/promises:289 triggerUncaughtException(err, true /* fromPromise */); ^ [Error: 44110000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl ecord\ssl3_record.c:355: ] { library: 'SSL routines', reason: 'wrong version number', code: 'ERR_SSL_WRONG_VERSION_NUMBER' } Node.js v20.11.1 Hope someone can help.
Watch Next: How to Run Slash Commands on your Discord Bot ►► th-cam.com/video/L-Gf2gPVscc/w-d-xo.html
Hey I am having an issue because your going to fast and it goes away not even a little bit after you do a line of code
after hundreds of videos that i have seen, this is the only one that worked. THANKS!!!
I can't get my bot online it just says
referenceError : GatewayIntentBits is not defined at object . then my pc desktop one drive then the folder name and it says src/index.js : 2:32 then it runs and comes up with node.js v18.17.1
To anyone still struggling with the invalid token error, move .env to the main folder. it wont work properly when its inside the same folder as your index.js file. Hope this helps!
thank you this really helped me
Thank you for making a good video on how to do this because I was really having trouble finding anything decent!
You are welcome!
Finally, a good video on how to do this! Thank you!
beautiful vid bro. if you are on linux try doing the npm init first and then the install
4:11 you dont need to paste it into the chat, you can just paste it into your web browser and invite it there. This is just for information, i am not suggesting anything to persuade your choice.
Good point. You can indeed paste the OAuth2 URL (the bot invite link) in a web browser if you find that more convenient.
Great video fr 🐐
bro they updated the oauth thing and now it requires some stupid uri thing
I found this useful for my dc server 🔥
Great tutorial! Just one tip dont use requiere anymore in js, use mjs files and use imports. I know sometimes its hard getting used to it, but its the new thing!
Thanks for watching! And yeah, you do bring up a good point regarding using 'imports' with ECMAScript modules (ESM) as it's the new thing in JS. However, in the tutorial, I used 'require' since I find it more conventional and compatible for Discord.js-related projects.
Thank you man your video really helped me
10:33 what did he do? i went over the code again and it’s saying error
Same here
Same
Super useful 🔥🔥
Great tutorial ❤
i have a question what is the package-lock.json for ?
Error: Cannot find module 'C:\Users\eliga\Desktop\code\code1\index.js'. Please verify that the package.json has a valid "main" entry
just got another error:
TypeError [ClientMissingIntents]: Valid intents must be provided for the Client.
Please help
Nice video!
Hello!
I've got a question; whenever i do the final step and "edit" the program after we already made the bot online, it's getting offline. I can't seem to find an answer as to why this is happening, as i followed every step correctly.
When I do the part at time stamp 10:10 it says
"node : The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or
if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ node .
+ ~~~~
+ CategoryInfo : ObjectNotFound: (node:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException"
can I get sum help😐.
i had the same error and all i did was save everything and restart the application
it seems that when i opened visual studio code , node was still installing
When I type “node .” In the terminal it just brings me right back to the folder, it doesn’t say “Bot is ready!” and it doesn’t give me an error code either :( idk what to do
late reply, sorry. hopefully u got it fixed now, but the solution is to restart your computer to fully install node.js, then try running it again. worked for me
Useful vid!
Nice MrJAwesome tutorial
I'm being stuck at this error
Please verify that the package.json has a valid "main" entry
whenever I try to save it I just follow the steps in the video I don't know if I'm doing it right
Nice Video 🔥
My one is saying referenceError : GatewayIntentBits is not defined at object . then my pc desktop one drive then the folder name and it says src/index.js : 2:32 then it runs and comes up with node.js v18.17.1
I hope if you may can explain whats mean const and those stuff I mean in a tutorial I want to understand what am I doing to learn about that but ill follow you for more tutorials anyway thanks.
Ur saying make sure to safe it. how do i safe it ? cuz when i type in node . its still not working.
Good tutorial ❤
great job
I can tell this is a good tutorial, but I got stuck at 5:10. Every time I put in cd desktop and my file names into command prompt, it always says my system can't find the path specified. I don't know if it's just because I'm using Windows and not iOS like you, or I'm just missing something obvious.
Hey there. Do you get the path can't be found error when typing "cd desktop"? If so, this is most likely because your "Desktop folder" exists inside of another location, so you would need to 'cd'' into the original location first. You can quickly see where your Desktop folder is located by creating a new file on your Desktop and then right-clicking on "properties" and seeing the file location of your Desktop. Hope this helps!
@@JishanKharbandathanks that helped
Dope tutorial
Thanks bro!
Very helpful!
Thanks!
Thanks 🙏
You have invalid token and one unclosed bracket on line 7. It hsa to be ) not }
Can you help me it isn't saying my bot Is online
@@fazezenh4237 what's the error
niceeeeee thanks!
I like your video but please explain what's going on in the code
Nice!
10:29 I saved everything and I am still getting the exact same error, please help with this!
bro help it asks me to put in a uri direct, idk what that is
bro it says invalid token when i type node . then press enter. what do i do???
Awesome
i cant get past 5:25 , it cannot find cd DiscordBots even tho i made it
Its helpful
my discord.js is installing but it isnt going into my created folder
did you run npm init -y
It says invalid token after i did the last part
Hello, make sure you correctly copied your token from your index.js file to your .env file and accurately updated your index.js file with the token variable.
Can you help me. why in first line console show error with require "require is not defined" i have the same code as you
In package.json, set the "type" field to "commonjs". Create it if it doesn't exist.
i did this tutorial 12 times wondering why it kept saying 'Please verify package.json has a valid "main" entry' only to realise just now i put scr instead of src for the folder and src for the package.json. I have no idea how i did this 12 times in a row
great now i have a new error after i fixed it "error: new Error("Used disallowed intents")"
with a quick google search fix it i am smart
i am now a computer expert
I know this was uploaded a while ago but I have inserted all of the index. js and when i run the command "node .
I get...
SyntaxError: Unexpected token '{'
This was done on discord js 14.12.1 however you did it on 14.11 so either the update had muddled the code up or I did something wrong.
EDIT: I figured out the problem!
Pls do tell
My one is saying referenceError : GatewayIntentBits is not defined at object . then my pc desktop one drive then the folder name and it says src/index.js : 2:32 then it runs and comes up with node.js v18.17.1
mine says used disallowed intents pleasee help
Nice
Just a quick question. The last set of code (x.user.tag) does it let the bot show it's online 24/7
No, the last set of code simply outputs to the console the bot's user tag. To make the bot online 24/7, you would need to run your program locally (on your computer) all the time or host it on a cloud platform like Replit.
Great
i made a typo and spent an hour trying to fix it
" node : The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At line:1 char:1
+ node .
+ ~~~~
+ CategoryInfo : ObjectNotFound: (node:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException " can someone help me out at the end i just copied him in eve but idk whats the problem here pls..
Same issue ever find a solution?
nah i just talked to my friend and made another one@@alejandroperez1227
Same issue
Same issue.
same issue
5:11 Why does my thing not work i tpyed "cd Desktop" "~ % cd Desktop", "-cd Desktop" Am I missing something?
type "cd OneDrive" before "cd Desktop"
Bro, When I put "node ." on terminal it have a problem. It say the term "node" is not recognized as the name of a cmdlet, function, script file.
This error is indicative that you have either not installed Node.js or have installed it in the wrong path. If you have already installed Node.js, try uninstalling it and reinstalling it (the LTS version) and choose the option along the lines of "add to PATH" during installation. This should resolve the issue, hope this helps!
keep getting syntax error unexpected token '{'
did you figure it out
i'm stuck on that too
good
Hey there,
Upon creating the terminal and entering "node .", i get this error message...
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^
ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (C:\Users\Ryan\Downloads\ODDS ON
ode_modules\undici\lib\core\connect.js:182:24)
at C:\Users\Ryan\Downloads\ODDS ON
ode_modules\undici\lib\core\connect.js:129:46
at Immediate._onImmediate (C:\Users\Ryan\Downloads\ODDS ON
ode_modules\undici\lib\core\connect.js:168:33)
at process.processImmediate (node:internal/timers:478:21) {
code: 'UND_ERR_CONNECT_TIMEOUT'
}
Node.js v20.8.1
Please help!!!
Nice video but how can i make it always online? I try to use replit but it still offline
the bot will not work until u turn on ur relit application
for tht u need to find and use a 24/7 mod to make it work without being offline which is pretty hard to do. hope it helped. :)
You can use cloud/cloud-based platforms (such as Replit or Heroku) to run and host your bot and keep it always online. It's worth noting though, that Replit scripts usually time out after 1 hour of inactivity causing your bot to go offline. To fix that, you can set up an HTTP web server (through an application such as UpTime Robot) that will send constant pings to your Replit script every 5 minutes, keeping your bot always online. Hope this helps!
Hello! I got a question. When I tried installing node js, 5 options popped up in the node js window and i didn't know which to install:
"Node.js runtime"
"corepack manager"
"npm package manager" (the one I tried but didn't work)
"Online documentation shortcuts"
and
"Add to PATH"
WHICH ONE OF ALL THE ABOVE DO I HAVE TO INSTALL???
Thanks! Have a great day!
i think installed Node.js runtime but i can't remember it was the first option
Anyone knowing how to make it be online always?
how to save package.json 10:25 ?
In this case, you can simply save the package.json file by using the keyboard shortcut "CTRL/CMD S".
4:41
this was to nerdy for me def not for beginners idk how to get to 5:16
it says cant read file
Niceeee
it says error: new error("used disallowed intents")
fixed it
please tell me how you fixed it
how you fix that???
cool
Hello. After following the tutorial. i got this error.
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^
[Error: 44110000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl
ecord\ssl3_record.c:355:
] {
library: 'SSL routines',
reason: 'wrong version number',
code: 'ERR_SSL_WRONG_VERSION_NUMBER'
}
Node.js v20.11.1
Hope someone can help.
"Tokeninvalid"
AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
NOT WORKING
❤❤❤
installed
Hey :-)
👋
Not working. Dislike
🙏🙏
❤❤❤