I love how this tutorial goes from the initial setup all the way to the deployment of the bot! A lot of tutorials only scope to the implementation, and leave the configuration up to a confused follower.
For those who are having , R10 error after 60s - adding a Procfile to the root directory helped, I added "worker: node bot.js" to the procfile, and pushed to the git repo, then manually deployed it, after that I disabled the deploy type of web, (from resources tab), and enabled the worker type Now it works, hope it helps
To explain this in a bit more detail; - You need to create a new file called `Procfile`. - Add the mentioned line `worker: node bot.js` to it in order to be able to see the option in the Resources menu in Heroku. - Enable the new option, disable the old one
Hello everybody. Kyle in this tutorial used an .env file to store his token and downloaded an .env library to read it in Javascript. But we can use Json file and directly import it from JavaScript and keep the folder size low
Getting a crash after 60 seconds of running on heroku, Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch. Edit: To fix make a Procfile in the bot root directory and add worker: node bot.js. In heroku disable web dyno and enable worker dyno.
Wow, I didn't know I could make Discord bots with JavaScript, gotta try it out one day, I had this very cool bot idea few years ago but I knew nothing about coding back then, perhaps I will be able to make my idea reality soon.
Hey Kyle I keep getting this error after about 3 mins of my bot running on Heroku "Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch" did you run into this problem? Saw something about changing something in Procfile but I'm not sure what that is.
adding a Procfile to the root directory helped, I added "worker: node bot.js" to the procfile, and pushed to the git repo, then manually deployed it, after that I disabled the web deploy type of web, (from resources tab), and enabled the worker type Now it works, hope it helps
He's using a bash terminal and u might be using a PowerShell. In PowerShell it doesn't look like a $ instead you are gonna have it like this: "Path-Of-Folder>". And now the main part is install Node.js to run NPM, node, and nodemon.
I'm embarassed to say but on the registration process I'm already getting stuck when trying to access $ npm init - y I'm getting this error $ : The term '$' 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 + $ npm unit -y + ~ + CategoryInfo : ObjectNotFound: ($:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
I am having trouble launching my bot to Heroku, everytime I try to launch it gives me an error after one minute of deployment exact, stating: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch. Please help
UPDATE: 17 December 2022 Heroku is dead New way to host one small bot for free is Daki. Which for me is even better because I hatw crawling in console documentation trying to tell github that I just want to update this file. Also, new syntax for discord.js is this: messageCreate instead of message, new Discord.Client({ intents: [insert a number code]}); You can find that code on your discord creators panel where it has checkboxes with permissions for your bot, you can just check what you need and copy resulting code below.
Let's say our bot gonna handle like 50 commands, now we have everything in client.on('message') listener and we're writing everything in if statements, is there any better way to write code like this without having 50 if's? Can you categorize commands into different directory like economy etc?
late reply, but that’s the job for a command handler. instead of using if/switch statements, you can preload the commands and run it whenever a user calls a command in littler and nicer code.
i cant seem to get it to run. im only partially through the vid but, it says "client missing intents" I don't think i saw him go over this yet. Im researching it now. but if anyone knows, it would be helpful. Thanks
Question: Hello guys, I have followed Kyle's tutorial and the Bot that I created seems to be working fine without Heroku. So I wonder what that Heroku site or whatever is for ?
This is the way Discord bots are setup. The code for the bot is just a server that is running and the way your server gets information is by you adding a bot to a server.
I love how this tutorial goes from the initial setup all the way to the deployment of the bot! A lot of tutorials only scope to the implementation, and leave the configuration up to a confused follower.
Omg i was searching for it few days back and getting it from you is a blessing 😁
Stop lying for attention man.Its not worth
Same
Me literally Yesterday
This is the most clear discord bot tutorial ever
Hey Kyle, thank you for this tutorial. I never knew creating Discord bots were this easy!
Great Tutorial from a Great person. Truly in love with your work man!🙇♂️
@No One Nobody 😂
For those who are having , R10 error after 60s -
adding a Procfile to the root directory helped, I added "worker: node bot.js" to the procfile, and pushed to the git repo, then manually deployed it, after that I disabled the deploy type of web, (from resources tab), and enabled the worker type
Now it works, hope it helps
To explain this in a bit more detail;
- You need to create a new file called `Procfile`.
- Add the mentioned line `worker: node bot.js` to it in order to be able to see the option in the Resources menu in Heroku.
- Enable the new option, disable the old one
@@Klyner007 Thanks for making it more clear
You both are absolute gods.
This is probably one of the best tutorials out there. Thank you!
Thanks Kyle this was really good ! would love to to see more cool things about bots in the future
I swear I always and thinking of doing something and then that day or the next day you come out with a video for it! Love your content!
Hello everybody. Kyle in this tutorial used an .env file to store his token and downloaded an .env library to read it in Javascript. But we can use Json file and directly import it from JavaScript and keep the folder size low
Super informative! I've been wondering about how to create a discord. Thanks.
I watched this only for the deployment, but I respect you and you are very helpful (I have also watched other videos)
This video is awesome !! It's really a web dev simplified ... always wait for
amongst many other videos, i find yours the best
Getting a crash after 60 seconds of running on heroku, Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch.
Edit: To fix make a Procfile in the bot root directory and add worker: node bot.js. In heroku disable web dyno and enable worker dyno.
Wow, I didn't know I could make Discord bots with JavaScript, gotta try it out one day, I had this very cool bot idea few years ago but I knew nothing about coding back then, perhaps I will be able to make my idea reality soon.
Discord runs on javascript, even the desktop app.
Man I like your Tuts. Such a time saver.
This is great. Will you make more of these Discord Bot tutorial in the future ?
Hey Kyle I keep getting this error after about 3 mins of my bot running on Heroku "Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch" did you run into this problem?
Saw something about changing something in Procfile but I'm not sure what that is.
adding a Procfile to the root directory helped, I added "worker: node bot.js" to the procfile, and pushed to the git repo, then manually deployed it, after that I disabled the web deploy type of web, (from resources tab), and enabled the worker type
Now it works, hope it helps
I love WDS
This is definitely simple to start with 😉
this was really helpful, thx man, but i have a question how do i open the console like how you did in 3:55
ctrl + ` in vscode
I was planning to make a discord bot on weekend and today booom, I see this video :)
Great Video! You should make one where you can have the discord bot be voice command instead of a music bot
Lord Kyle has blessed us with a discord bot tutorial.
let's enhance this knowledge and spread peace with the world.
A suggestion: You don't have to copy 'heart emoji' off google. There's emoji insertion feature in Windows 10: Press [Windows] + [ . ](dot key)
Hi. Do you know what might be the reason for this error: Web process failed to bind to $PORT within 60 seconds of launch
I can't believe you also do discord.js! I commend you!
Thank you! This was very useful
you have my respect Kyle.
11:42 Hahaha "take the user of the meSaghesr"
Wonderful content sir, thanks!
How did you install the packages through the terminal? I keep getting an error that $ isn't a thing, same with npm.
He's using a bash terminal and u might be using a PowerShell. In PowerShell it doesn't look like a $ instead you are gonna have it like this: "Path-Of-Folder>". And now the main part is install Node.js to run NPM, node, and nodemon.
U have to install the packages to use their commands 💀
Hey brother.... Is the deployment process is same for any other backend code?
Is it same even if ive react frontend code and node backend code?
I'm embarassed to say but on the registration process I'm already getting stuck when trying to access $ npm init - y
I'm getting this error
$ : The term '$' 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
+ $ npm unit -y
+ ~
+ CategoryInfo : ObjectNotFound: ($:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Don’t type the $
Smh
For some reason for me the bot crashes after a minute: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
I got the same error, did you figure out a way to fix it?
how do you open visual studio code
Holy shit! Kyle you legend!
I am having trouble launching my bot to Heroku, everytime I try to launch it gives me an error after one minute of deployment exact, stating: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch. Please help
Amazing tutorial!!!
can you make a discord bot series?
Waiting for this 🔥🔥
UPDATE:
17 December 2022
Heroku is dead
New way to host one small bot for free is Daki. Which for me is even better because I hatw crawling in console documentation trying to tell github that I just want to update this file.
Also, new syntax for discord.js is this:
messageCreate instead of message,
new Discord.Client({ intents: [insert a number code]});
You can find that code on your discord creators panel where it has checkboxes with permissions for your bot, you can just check what you need and copy resulting code below.
I love WDS
U r the best kyleeeeee I'm sry if I spelled it wrong
heroku is no longer free is there another way to host the bot for free?
You are big saviour☺️
Anybody that loves WDS is awesome.
Run works fine for me but the bot is not working on discord for some reason, i added the GatewayIntentBits since it requires this in the new update
You must be using some jedi mind reading tricks. I was thinking about this just a day ago
Thank you so much
Bro please create a " learn node and backend with js today " course
He can read my mind
Let's say our bot gonna handle like 50 commands, now we have everything in client.on('message') listener and we're writing everything in if statements, is there any better way to write code like this without having 50 if's? Can you categorize commands into different directory like economy etc?
Use a switch statement. Unfortunately, what you described is not doable afaik
late reply, but that’s the job for a command handler. instead of using if/switch statements, you can preload the commands and run it whenever a user calls a command in littler and nicer code.
i cant seem to get it to run. im only partially through the vid but, it says "client missing intents" I don't think i saw him go over this yet. Im researching it now. but if anyone knows, it would be helpful. Thanks
Question:
Hello guys, I have followed Kyle's tutorial and the Bot that I created seems to be working fine without Heroku. So I wonder what that Heroku site or whatever is for ?
So you don’t have to keep your computer running 24/7 for your bot
nice but I need some advanced stuff related to bot
This is great🔥🔥
this was a great video
Amazing job!!!
When I type npm init -y in terminal. I get an error message. " The term 'npm' is not recognized as the name of a cmdlet". Not sure how to fix this?
Install node js
this is a good tutorial however, i had many issues understanding the visual studio code part.
How are you opening the console?
Ctrl + shift + tilde
Dude do one video on parsing video and converting the audio played in the video to text in javascript.
😂instead of making an app, i would just type the audio out... btw it's a cool project to build... i'll try to build it my self.
Thanks bro
Awesome, please make a tutorial on how to make a WhatsApp bot , Instagram bot and telegram bot
This works in private calls?
I have a question
How can we make a button that can copy some text?
Thanks I like it
can u tell the git command u typed or anyone else
thanks in advance
my bot is offline i did no programming just made it in discord but when i added it to server its offline 24/7
do you have to be a discord bot dev?
Wdym?
So we can sort of hack-deploy our bot not to discord server which costs money and deploy on Heroku for free? Is it even approve by discord??
This is the way Discord bots are setup. The code for the bot is just a server that is running and the way your server gets information is by you adding a bot to a server.
Hosting is not illegal in terms of discord. If it was the bot feature would be gone!
I sent out my first bot but I don't know how to code! Nor is there any free coding websites for discord coding bots
When I open the terminal it uses powershell and says that "npm isn't a recorgnised command"
I downloaded git but it still doesn't work. It now says that "npm: command not found"
You need to install node js. The latest version of discord.js requires node.js 16.6.0 or newer.
can you make a new video for this since the content changed now?
Heroku dynos are no longer for free
... this man
This video needs an update with the v13 because nothing in this tutorials works anymore
It does!
Can you do a vid on telegram bot too
Yes, yes, yes.
super
I am getting an error while doing npm start, can anybody give the solution to fix it
Not without any context at all??
6:42 npm start isnt working for me, gives an error
Don't go to Google to copy emojis... Use Win + . (Win + period).
Omg dude superb tutorial..
How do i Open the console?
Haha - our bots got the same coloured pfp
Make a same video for telegram bot
Has nodejs or the discordjs change in the last few months, nothing of what he shows works for me
@Mr. Unknown there's very slight changes, you can just fix em.
So if someone wants to use my bot. how can he? Is there something like downloading bot?
They just need to invite the bot into their server.
However you set the bot to work, that's how the guild member will use it
Why are you not using switch-case smh my head
Unfortunately Heroku no longer has a free tier
Lol, I used Discord.py Rewrite and followed TechWithTim's tutorial
I used that exactly a year ago! It's super easy
my code can't push :
YandereDev: I´m four parallel universes ahead of you.
the newest version of the discord lib messes everything up, this tutorial needs an update
Don't forget you can write your own code!
@@Create-zc8qe Don't forget you weren't born with coding knowledge and had to learn at some point too!
@@SuperYtc1 thx
Fun fact, my girlfriend yell at me when I delete message too
my bot is offline
pog