I'm a noob and the video seemed rather complicated to me on first viewing, but thanks to the github link you provided I was able to study your code and I finally understood! Everything is organized with great intelligence, I've learned a lot thank you! You really have a gift for explaining things so I support you, keep it that way.
Amazing tutorial , covers the best practices of folder structure , code refactoring into seperate files and the most importantly the code is up to date and it works. Really easy to follow and learn not just copy paste the code
I always found command handling very complicated with all that file structure and links between files. Your video helped me understand much easier than other tutorials I've seen, thank you very much for this very advanced file structure
New commands + event handler: ua-cam.com/video/qmuPOimscPs/v-deo.html IMPORTANT: In 28:49 and 30:02 change the "break" to "return". Reason: Using break will only half work as it won't reply if there's more than one permission. However it will still run the rest of the function which means it'll attempt to still run the command at the end of the function. Return will make sure the function stops completely. Sorry for the inconvenience. This change has already been reflected on the github repository
took me literally 4 days to understand this code, but i finally get it and to be honest, this code has many use cases in all types of javascript programming. Very good video thanks man
I think you were a bit too fast at times, I often had to pause and go back few seconds to finalize what I was typing. But overall I'm glad I finally found a video that explains this structure to me and how to do it. I'm new to nodejs/discordjs and I found this helpful and interesting.
what a comprehensive video and such a powerful command and event handler im surprised the video was only a little over 30 mins... u do such a great job at explaining everything step by step, i appreciate that. Pretty advanced tutorial, I have programming experience so I was able to follow pretty well but for some who dont have much experience, i think explaining the overall high level purpose of functions we're creating would help everyone understand and put everything together easier. Besides that great job! Keep it up!
I personally enjoyed this video and learned a lot from it because I took the time to research the parts I didn't understand while watching this video. Great work and appreciate all the time you put into this one! Additionally, for anyone that ran into this following error: There was an error: *"TypeError: Cannot read properties of undefined (reading 'fetch')"* Solution for me was to make sure my "testServer" value in your config.json is a string. For example, my config.json file looks like this right now (I changed the numbers so they don't match with what's in my file): { "testServer": "1234580157137123456", "devs": "123451850396123456" }
A great, and very intense vid. So much packed in that it will take a few views to understand it properly. My only request would be a vid on making a version of this that can work on multiple servers rather than just one.
I'm lost at Javascript actually, I don't know what to create and I thought why not create a Discord Bot (Game). Stumb led upon this great tutorial, and understand the logic of EventHandler and some Advanced path creating techniques, thanks man!
So when i run this code everything seems to work fine, and when I add a new .js file in the misc or moderation folder and run my program, I can get it to say the new command has been registered. But when i go to discord, no new command option ever pops up. I just have ping and ban and thats it. I have been working on this for such a long time and am totally lost on why it says its registered but never becomes an option to be ran. Any help would be hugely appreciated!!!
Thanks a lot for this series, seems that you are the only one that explains discord.js v14 so perfect. Also the Github repo is very useful. I tried to learn file handling from the documentation but it was complicated. This video got the point 🎯. Also please make a video to *host our bot online 24/7* for free. I think it also would be great to find any way other than Replit. I failed to make it work anyways. Good Luck.
I'm not sure if it is a Windows file permission issue or something but for whatever reason my console is writing out the arrays to be empty in VS Code. It's still recognizing that there is two elements in fileNames[] but both of those elements are empty and just write [][] to the console. EDIT: Must have been something on my end because I pulled your git and it worked fine. Thanks.
This is great and I was able to follow everything just fine but I'm also 100% certain I'm just going to download the source for this project structure from the Github repo and use that as my starting template lol. I'll be adding TypeScript though.
hey @UnderCtrl ,I have been following your tutorial (God bless you! thank you!) and my eventListener is not working like yours on 08:50; can you help me what possibly went wrong??
for some reason, when I try to run it, everything works, except for ban.js and ping.js. It says Error: File C:\Users\PC\Desktop\hmm\TestBot\src\commands\moderation\ban.js must export "data".'. Can someone help me please? :(
Great video but I foolishly decided to make my project a module project. This left issues with `__dirname` but I guess that is 100% my fault. I am curious why you don't use modules instead?
Hard tutorial. Everything was going right in the beginning but as I followed along my brain got confused with so many files and folders as it was the first time I used too many files and folders. Do all professional developers use separate files for separate functions? I also faced a problem. VScode autocomplete suggestion feature was working less when working in separate files. How to fix it?
I'm not a professional, but i can say that if the commands seperated to the different files, looks better than one file. Basically you don't have to search tons of code when you want to edit something.
nice tutorial! There's a small issue with the event handler though, as it assumes you're only passing in a single argument along with client. This will give issues when your events have multiple parameters. To fix this make sure you pass in all arguments (...args) instead of just one.
after going through this video, I followed along step by step, but encountered an error I then copy and pasted from you github source and I'm still receiving this error: node:events:489 throw er; // Unhandled 'error' event ^ TypeError: eventFunction is not a function at Client. (C:\Users yans\Desktop\ShapaBot\src\handlers\eventHandler.js:16:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Emitted 'error' event on Client instance at: at emitUnhandledRejectionOrErr (node:events:394:10) at process.processTicksAndRejections (node:internal/process/task_queues:84:21) any help would be amazing
mine was working but just started throwing this error fsr EDIT: MAKE SURE YOU HAVE THE PROPER MODULE.EXPORTS CODE IN ANY NEW FILES YOU CREATE OR ELSE IT *WILL* THROW THIS ERROR
Okay, so I'm at the 13:50 mark, and for some reason the app is crashing. According to debug it's in the eventHandler.js line 15 "const eventFunction = require(eventFile);" I've rechecked every file multiple times for errors and I can't seem to figure out why it's crashing. Everything up to this point was working just fine.
Same error dude, Could you solve it? Edit: I have solved the problem, check that the codes of the "events" folder exporting the function, check the syntax of "module.exports"
@@saidrexxx I ended up copying the files from github, and it at first still didn't work, then I discovered a .DS file and deleted that... seems to have fixed the problem.
I keep getting stuck around 5-6 minutes with an error telling me ReferenceError: getAllFiles is not defined when I'm attempting to run the node src/index.js command in the Terminal Edit: I've followed every single step as they come, so I'm confused why it wouldn't work. Edit2: I've decided to just go back to previous videos and watch every single one in order since you might've asked us to do something that I haven't done yet etc. Tho you could try to explain the solution if you know it, for others that might be on the same halt as me.
What are all your relevant VS extentions? like when you type a function and it automatically requires the file, and the one that autocomplete things, like ";", etc...
how to fix this? There was ann error: ReferenceError: commandObject is not defined i checked every single files, everything works fine except for that error. Btw my bot still online.
the same line where you inialize that commandObject make sure you do it right i had the same problem and truns out i interaction name property is called commandName
I'm trying to work with the "threadUpdate" event which has 2 arguments instead of one. The Old Thread and the New Thread. I found a work around by saying if its the "threadUpdate" event, pass 2 arguments. Is there a way to make it work no matter how many arguments? I tried with an array but I kept getting an iterator error. module.exports = async (client, oldThread, newThread) => { try { if (oldThread.parent.type === ChannelType.GuildForum) { console.log("Old Thread Updated!"); } if (newThread.parent.type === ChannelType.GuildForum) { console.log("New Thread Updated!"); } } catch (error) { console.log(`There was an error running this command: ${error}`) } };
so I am having an issue with this where its making all of my commands to only work in my personal server and not other servers where i put the bot, how do i fix that
On Client.MessageUpdate you have two arguments, oldMessage and newMessage. This method only supports one argument from the event, so my event function would get only client and oldMessage. Solved it like this: client.on(eventName, async (...args) => { for (const eventFile of eventFiles) { const eventFunction = require(eventFile); await eventFunction(client, ...args); } });
Great content! Using this organization to register commands, i've done a lot things! btw on register commands, we have a testserver on config.json, i'm testing on multiple servers but if a server isnt on config.json testServer, the command doesnt register on differentes servers. Any idea about it?
Great vids!! I've been following the tutorials gotta say this one is packed, I was stuck a few times with some errors (I'm only just learning JavaScript) but always found something I missed that caused the error.....except now I've been stuck on a ""DiscordAPIError[10004]: Unknown Guild"" for the past few days at 24:31 the console doesn't return the guild commands it just throws that error (If I remove "testServer" it returns the commands as it should.) has anyone ran into this issue or have an idea about where I messed up??
VS Code is weird, so if the only thing inside of 'events' is 'ready' then it auto shows the content of 'ready'. You should be able to right click 'events' and create another folder. If not it may be easier to use your console. 'cd' into 'events' and use the command 'mkdir '
Just use GPT bro. Also, I recommend commenting out every piece of code you do so you can quickly understand it. This is from GPT: const channel = interaction.guild.roles.cache.get(""); Let's break it down: interaction refers to the interaction object, which represents an interaction with a Discord message or component. guild is a property of the interaction object that refers to the guild (server) where the interaction occurred. roles is a property of the guild object that represents the collection of roles in the guild. cache is a property of the roles object that contains a cached collection of roles for efficient access. get() is a method provided by the cache property to retrieve a role from the cache based on its ID. In this specific code snippet, interaction.guild.roles.cache.get("") attempts to retrieve a role from the cache based on an empty string as the role ID. However, since an empty string is not a valid role ID, it will likely return undefined or an error. To utilize this code correctly, you need to provide a valid role ID inside the get() method to retrieve the corresponding role from the cache.
There was an error: DiscordAPIError[30034]: Max number of daily application command creates has been reached (200) running ur code gave me this error what should I do?
hi i need delete commands how can I do? I made the deleted part true but In the console it says this: Skipping registering command "checkprice" as it's set to delete. Even though I deleted the js file, it shows up in dc
hello, i really like your videos but im stuck on an error when i try to "node src/bot.js" it says "ReferenceError: Cannot access 'files' before initialization" i still dont understand what do i do wrong im still looking out, i would like to fix it if you could help me
Same problem i had to replace eventFolders to eventFolder and it worked but it didn't show the same thing in the video and im not sure it's right since it's not the same as video
hey great vid, but I have a thought on how to create some sort of internal timeout for a command, for user level timeout (individual using same command) and server level timeout(anyone in the server using the command). or maybe a global level timeout? haha not sure what would be the usecase for this one tho
**Is there a command that I can only share pictures or videos with? Is there a coding that I can use to jump into a bot? I really need it.** . ** If so can you help? about how it's done. Thank you.**
I understood the video was going to be quicker, but I think it was way too rushed to be able to understand anything. I don't feel that I actually learned anything during this tutorial other than copy pasting the code you wrote, which could have been done from github in a few minutes tops anyways. There was no real explanation of what a lot of these components do or why we're setting it up this way.
Fair enough. I watched this video again and I agree with you 100%. I think I was trying to hard to make the video as short as possible. I’ll most likely be doing an updated version of this. Thanks a lot for the feedback 🙏
Hey, will this work for sub-directories and how do i make all my commands visible in every server, how do i decide which commands i want in which guild and which i want to be global? (i want all of them global tho, lmao)
Hi, currently very unorganised since I’m adjusting between my college and even the JavaScript course I’m working on. I’ll most likely set one up by next week. You can keep an eye out on my discord. discord.underctrl.io
Sorry to hear that. I did mention the video was going to be fast paced to save time. Thanks for the feedback however. I'm planning on a newer version of this video.
Not gonna lie, this was one of the worst tutorials I've seen in a while. Your other tutorials have been great, but this one doesn't explain anything and it cuts parts of you pasting code without explaining what changed.
Fair enough. As I mentioned at the start of the video there was a ton to cover so I hoped viewers at least had some basic understanding of JavaScript (which is a requirement for this series) so that I don't have to explain every little detail.
I'm a noob and the video seemed rather complicated to me on first viewing, but thanks to the github link you provided I was able to study your code and I finally understood!
Everything is organized with great intelligence, I've learned a lot thank you! You really have a gift for explaining things so I support you, keep it that way.
Amazing tutorial , covers the best practices of folder structure , code refactoring into seperate files and the most importantly the code is up to date and it works. Really easy to follow and learn not just copy paste the code
I always found command handling very complicated with all that file structure and links between files.
Your video helped me understand much easier than other tutorials I've seen, thank you very much for this very advanced file structure
New commands + event handler:
ua-cam.com/video/qmuPOimscPs/v-deo.html
IMPORTANT: In 28:49 and 30:02 change the "break" to "return".
Reason: Using break will only half work as it won't reply if there's more than one permission. However it will still run the rest of the function which means it'll attempt to still run the command at the end of the function. Return will make sure the function stops completely. Sorry for the inconvenience.
This change has already been reflected on the github repository
took me literally 4 days to understand this code, but i finally get it and to be honest, this code has many use cases in all types of javascript programming. Very good video thanks man
I think you were a bit too fast at times, I often had to pause and go back few seconds to finalize what I was typing.
But overall I'm glad I finally found a video that explains this structure to me and how to do it. I'm new to nodejs/discordjs and I found this helpful and interesting.
Sorry about that. Unfortunately the code for this video was quite a lot which is why I had to move a little faster than usual.
Ignore the hate, this channel has the best possible tutorials! The people hating just do NOT care about JS and skip it and come here to spread hate.
what a comprehensive video and such a powerful command and event handler im surprised the video was only a little over 30 mins... u do such a great job at explaining everything step by step, i appreciate that. Pretty advanced tutorial, I have programming experience so I was able to follow pretty well but for some who dont have much experience, i think explaining the overall high level purpose of functions we're creating would help everyone understand and put everything together easier. Besides that great job! Keep it up!
I personally enjoyed this video and learned a lot from it because I took the time to research the parts I didn't understand while watching this video. Great work and appreciate all the time you put into this one!
Additionally, for anyone that ran into this following error: There was an error: *"TypeError: Cannot read properties of undefined (reading 'fetch')"*
Solution for me was to make sure my "testServer" value in your config.json is a string. For example, my config.json file looks like this right now (I changed the numbers so they don't match with what's in my file):
{
"testServer": "1234580157137123456",
"devs": "123451850396123456"
}
A great, and very intense vid. So much packed in that it will take a few views to understand it properly.
My only request would be a vid on making a version of this that can work on multiple servers rather than just one.
To register commands globally just remove the guild id from config.json
@@UnderCtrl Ah ok that's remarkable simple then.
This will form the basis of my upcoming bots so thanks again.
This is best file structure for discord.js. Nice video, helped me a lot! Thanks!
I'm lost at Javascript actually, I don't know what to create and I thought why not create a Discord Bot (Game). Stumb led upon this great tutorial, and understand the logic of EventHandler and some Advanced path creating techniques, thanks man!
Awesome video!! thank you, and thank you again for providing the source code it make finding errors a lot easier!
Great content dude. I lost motivation to use JavaScript, but this rekindled that fire in me!
The best Video i have ever watched about command handling thank you!
I love your explanation + the way you code 😊...
So when i run this code everything seems to work fine, and when I add a new .js file in the misc or moderation folder and run my program, I can get it to say the new command has been registered. But when i go to discord, no new command option ever pops up. I just have ping and ban and thats it. I have been working on this for such a long time and am totally lost on why it says its registered but never becomes an option to be ran. Any help would be hugely appreciated!!!
Thanks a lot for this series, seems that you are the only one that explains discord.js v14 so perfect. Also the Github repo is very useful. I tried to learn file handling from the documentation but it was complicated. This video got the point 🎯. Also please make a video to *host our bot online 24/7* for free. I think it also would be great to find any way other than Replit. I failed to make it work anyways. Good Luck.
Thanks for the kind words!
I have a tutorial on bot hosting as well ua-cam.com/video/f7KjJQVcogY/v-deo.html
@@UnderCtrl Thanks a lot, definitely will watch it
I'm not sure if it is a Windows file permission issue or something but for whatever reason my console is writing out the arrays to be empty in VS Code. It's still recognizing that there is two elements in fileNames[] but both of those elements are empty and just write [][] to the console.
EDIT: Must have been something on my end because I pulled your git and it worked fine. Thanks.
Hey how did you fix that I am having the same issue
@@genshinryuga the problem is probably caused because you missed the if, else brackets in the getAllFiles function
@@muriilouwu Yep, that was the issue for me! Thanks
This is not registering the commands golbaly on my other servers. Is this code meant to do that? If so any help would be amazing!
This is great and I was able to follow everything just fine but I'm also 100% certain I'm just going to download the source for this project structure from the Github repo and use that as my starting template lol. I'll be adding TypeScript though.
Im getting this error There was an error: DiscordAPIError[50035]: Invalid Form Body
name[BASE_TYPE_REQUIRED]: This field is required
I had this issue because I had a blank file somewhere in the commands directory that wasn't providing the values of name, description, options
Solved 👍
hey @UnderCtrl ,I have been following your tutorial (God bless you! thank you!) and my eventListener is not working like yours on 08:50; can you help me what possibly went wrong??
When creating commands in files, I get errors when trying to add "ApplicationCommandOptionType". What do I do?
for some reason, when I try to run it, everything works, except for ban.js and ping.js. It says Error: File C:\Users\PC\Desktop\hmm\TestBot\src\commands\moderation\ban.js must export "data".'. Can someone help me please? :(
Great video but I foolishly decided to make my project a module project. This left issues with `__dirname` but I guess that is 100% my fault. I am curious why you don't use modules instead?
No specific reason tbh. I just didn't bother changing.
@@UnderCtrl oh awesome. I ended up having to change things around but it's been a fun hurdle.
Hard tutorial. Everything was going right in the beginning but as I followed along my brain got confused with so many files and folders as it was the first time I used too many files and folders. Do all professional developers use separate files for separate functions? I also faced a problem. VScode autocomplete suggestion feature was working less when working in separate files. How to fix it?
I'm not a professional, but i can say that if the commands seperated to the different files, looks better than one file. Basically you don't have to search tons of code when you want to edit something.
nice tutorial! There's a small issue with the event handler though, as it assumes you're only passing in a single argument along with client. This will give issues when your events have multiple parameters. To fix this make sure you pass in all arguments (...args) instead of just one.
after going through this video, I followed along step by step, but encountered an error
I then copy and pasted from you github source and I'm still receiving this error:
node:events:489
throw er; // Unhandled 'error' event
^
TypeError: eventFunction is not a function
at Client. (C:\Users
yans\Desktop\ShapaBot\src\handlers\eventHandler.js:16:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:394:10)
at process.processTicksAndRejections (node:internal/process/task_queues:84:21)
any help would be amazing
mine was working but just started throwing this error fsr
EDIT: MAKE SURE YOU HAVE THE PROPER MODULE.EXPORTS CODE IN ANY NEW FILES YOU CREATE OR ELSE IT *WILL* THROW THIS ERROR
Have you solved the problem?
@@highoncatnip_ TYSM i had this problem
i wrote "module.export" instead of "module.exports" and i get the problem
Okay, so I'm at the 13:50 mark, and for some reason the app is crashing. According to debug it's in the eventHandler.js line 15 "const eventFunction = require(eventFile);" I've rechecked every file multiple times for errors and I can't seem to figure out why it's crashing. Everything up to this point was working just fine.
Same error dude, Could you solve it?
Edit: I have solved the problem, check that the codes of the "events" folder exporting the function, check the syntax of "module.exports"
@@saidrexxx I ended up copying the files from github, and it at first still didn't work, then I discovered a .DS file and deleted that... seems to have fixed the problem.
I keep getting stuck around 5-6 minutes with an error telling me ReferenceError: getAllFiles is not defined when I'm attempting to run the node src/index.js command in the Terminal
Edit: I've followed every single step as they come, so I'm confused why it wouldn't work.
Edit2: I've decided to just go back to previous videos and watch every single one in order since you might've asked us to do something that I haven't done yet etc. Tho you could try to explain the solution if you know it, for others that might be on the same halt as me.
Be sure to import the function ☺
I think he has an extension that auto imports it automatically when he references it.
@@mariesaoconnell7281 Thx for the tip
What are all your relevant VS extentions? like when you type a function and it automatically requires the file, and the one that autocomplete things, like ";", etc...
The code formatter is responsible for adding the ; and it's called "Prettier".
The auto complete/import is a built in feature in vscode.
Hye, how long have you been creating these discord bots?
hey bro i've done everything in the video currectly , bot in running and its okay but the bot is not responding to the commands can you help me ?
same problem here, did you guess how to fix the problem ?
16:56 Is there a reason you use mentionable instead of user? Roles are mentionable..
During the time of recording I believe I wasn't aware of there being user instead of mentionable. User would be the correct choice
what theme did you use?
how to fix this?
There was ann error: ReferenceError: commandObject is not defined
i checked every single files, everything works fine except for that error. Btw my bot still online.
the same line where you inialize that commandObject make sure you do it right i had the same problem and truns out i interaction name property is called commandName
Help a ton!
Hi how are you doing? I have a question how can I make it multi server????, this was is just for the test server. TY for the incredible video
I'm trying to work with the "threadUpdate" event which has 2 arguments instead of one. The Old Thread and the New Thread. I found a work around by saying if its the "threadUpdate" event, pass 2 arguments. Is there a way to make it work no matter how many arguments? I tried with an array but I kept getting an iterator error.
module.exports = async (client, oldThread, newThread) => {
try {
if (oldThread.parent.type === ChannelType.GuildForum) {
console.log("Old Thread Updated!");
}
if (newThread.parent.type === ChannelType.GuildForum) {
console.log("New Thread Updated!");
}
} catch (error) {
console.log(`There was an error running this command: ${error}`)
}
};
Hey please join my server and I’ll help from there. discord.underctrl.io
BAN command is not working, it say " Cannot read properties of undefined (reading 'has') "
so I am having an issue with this where its making all of my commands to only work in my personal server and not other servers where i put the bot, how do i fix that
your VSC theme is beautiful. name?
On Client.MessageUpdate you have two arguments, oldMessage and newMessage.
This method only supports one argument from the event, so my event function would get only client and oldMessage.
Solved it like this:
client.on(eventName, async (...args) => {
for (const eventFile of eventFiles) {
const eventFunction = require(eventFile);
await eventFunction(client, ...args);
}
});
thanks you are a king
Great content!
Using this organization to register commands, i've done a lot things!
btw on register commands, we have a testserver on config.json, i'm testing on multiple servers but if a server isnt on config.json testServer, the command doesnt register on differentes servers.
Any idea about it?
If you remove the testServer, it should globally register the commands.
Great vids!! I've been following the tutorials gotta say this one is packed, I was stuck a few times with some errors (I'm only just learning JavaScript) but always found something I missed that caused the error.....except now I've been stuck on a ""DiscordAPIError[10004]: Unknown Guild"" for the past few days at 24:31 the console doesn't return the guild commands it just throws that error (If I remove "testServer" it returns the commands as it should.) has anyone ran into this issue or have an idea about where I messed up??
broo i cant create a folder in events? it is showing events/ready
VS Code is weird, so if the only thing inside of 'events' is 'ready' then it auto shows the content of 'ready'. You should be able to right click 'events' and create another folder.
If not it may be easier to use your console. 'cd' into 'events' and use the command 'mkdir '
bro Im literally having the exact same issue, I think it's messing with the filepath I made in eventHandler
Please explain basics like
Const channel = interaction.guild.roles.cach.get("")
Like these basics
Please explain them
What do you want to know?
Just use GPT bro. Also, I recommend commenting out every piece of code you do so you can quickly understand it. This is from GPT:
const channel = interaction.guild.roles.cache.get("");
Let's break it down:
interaction refers to the interaction object, which represents an interaction with a Discord message or component.
guild is a property of the interaction object that refers to the guild (server) where the interaction occurred.
roles is a property of the guild object that represents the collection of roles in the guild.
cache is a property of the roles object that contains a cached collection of roles for efficient access.
get() is a method provided by the cache property to retrieve a role from the cache based on its ID.
In this specific code snippet, interaction.guild.roles.cache.get("") attempts to retrieve a role from the cache based on an empty string as the role ID. However, since an empty string is not a valid role ID, it will likely return undefined or an error.
To utilize this code correctly, you need to provide a valid role ID inside the get() method to retrieve the corresponding role from the cache.
There was an error: DiscordAPIError[30034]: Max number of daily application command creates has been reached (200) running ur code gave me this error what should I do?
There’s an error going on with the discord api at the moment. All you can do it wait until they fix it.
this is a good tutorial, but is there any way to make this work to register commands globally instead of on just one server?
hi i need delete commands how can I do? I made the deleted part true but In the console it says this: Skipping registering command "checkprice" as it's set to delete. Even though I deleted the js file, it shows up in dc
Have you came up with any solutions? I have the exact same problem, sorry that I'm asking after 10 months
I got TypeError: eventFunction is not a function and idk how to fix it, I litteraly do everything on ur vid and still not working, any help plzzzz
Is there a reason your using the intent bit flag and not the gateway intent bit?
hello, i really like your videos but im stuck on an error when i try to "node src/bot.js" it says "ReferenceError: Cannot access 'files' before initialization" i still dont understand what do i do wrong im still looking out, i would like to fix it if you could help me
its the 05:46 part
i managed to solve the problem myself
im stuck again...
i cant register my commands it gives error
I followed everything for some reason it didnt work for me it kept saying eventHandler wasnt defined
Did you defined it in the index.js
@@MemesChannel7531 yes that was where I wasnt able to pass at tbe part we defined it in index.js then tried testing it
Same problem i had to replace eventFolders to eventFolder and it worked but it didn't show the same thing in the video and im not sure it's right since it's not the same as video
hey great vid, but I have a thought on how to create some sort of internal timeout for a command, for user level timeout (individual using same command) and server level timeout(anyone in the server using the command). or maybe a global level timeout? haha not sure what would be the usecase for this one tho
Saved me 🎉❤😅
watchted till starting of ping.js at 14:38
**Is there a command that I can only share pictures or videos with? Is there a coding that I can use to jump into a bot? I really need it.**
.
** If so can you help? about how it's done. Thank you.**
I followed correctly but for the file path it returns me empty [ ]
your else in getallfiels is missplaced
I understood the video was going to be quicker, but I think it was way too rushed to be able to understand anything. I don't feel that I actually learned anything during this tutorial other than copy pasting the code you wrote, which could have been done from github in a few minutes tops anyways.
There was no real explanation of what a lot of these components do or why we're setting it up this way.
Fair enough. I watched this video again and I agree with you 100%. I think I was trying to hard to make the video as short as possible. I’ll most likely be doing an updated version of this. Thanks a lot for the feedback 🙏
this is Goldddd
how can I add subcommands using this type of command handler?
Why am I getting an TypeError: eventFunction is not a function even if I followed the vid correctly?
It’s because one of your event files is not exporting a function by default.
@@UnderCtrl is there a solution?
Hey, will this work for sub-directories and how do i make all my commands visible in every server, how do i decide which commands i want in which guild and which i want to be global? (i want all of them global tho, lmao)
hello can u help me why my console log not showing anything
Can you please use ES6 importing???
Is it possible to use subcommands using this command handler?
What does
// devOnly: Boolean,
// testOnly: Boolean,
mean?
Whats your discordjs upload schedule
Hi, currently very unorganised since I’m adjusting between my college and even the JavaScript course I’m working on. I’ll most likely set one up by next week. You can keep an eye out on my discord.
discord.underctrl.io
Cannot access path before initialization
Can u give me all your files ALL in One all pack when u did in this video ? because my bot doesnt work with my command: ping ;> ??
19:50
nice!
How to fix: ',' expenced
how to delete messages in channel?
do u really need help now ? i can help but i am not sure whether u need it or not!
bro i repeat the video 3 times and i still have problems understanding it hhh
great step-by-step tutorial, horrible explanation, had to use chatGPT to fix the errors.
Sorry to hear that. I did mention the video was going to be fast paced to save time. Thanks for the feedback however. I'm planning on a newer version of this video.
Not gonna lie, this was one of the worst tutorials I've seen in a while. Your other tutorials have been great, but this one doesn't explain anything and it cuts parts of you pasting code without explaining what changed.
Fair enough. As I mentioned at the start of the video there was a ton to cover so I hoped viewers at least had some basic understanding of JavaScript (which is a requirement for this series) so that I don't have to explain every little detail.