Uploaded January 2021 | Updated November 2026, 2 days ago
In this video I demonstrate how to manage multiple Discord bot commands with "a command handler" built with CommonJS and require() in node.js.π» thecodingtrain.com/learning/bots/discord/06-command-handler.html
π₯ All videos: youtube.com/playlist?list=PLRqwX-V7Uu6avBYxeBSwF48YhAnSn_sA4
Links discussed in this video:
π Discord.js Guide Command handling: https://discordjs.guide/command-handling/#command-handling
π Intro Discord Bot (Coding Garden GitHub): github.com/CodingGarden/intro-discord-bot
π import (Mozilla Docs): developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import
π import (Node.js v13 Docs): nodejs.org/docs/latest-v13.x/api/esm.html#esm_import_statements
π Choo choo bot on Glitch: glitch.com/~choo-choo-bot-discord
Other videos mentioned in this video:
π₯ Coding Garden with CJ - Build a Discord bot: youtu.be/gzM7kj6gV5I
Timestamps:
0:00 Welcome Back!
0:39 Explain! What's a command handler?
3:03 Code! Create commands.js using gotMessage()
5:36 Try! Let's see if it works
6:26 Code! JavaScript files for each command
7:59 Code! Let's see if the message a valid command
9:27 Code! Object for looking up commands
11:11 Try! Test to see if the system works
12:00 Code! Call choochoo command from choochoo.js
13:54 Try! Ahh let's see if this works
14:04 Code! Add the gif command
15:14 Try! Let's try running it
15:49 Recap!
17:00 Possible Improvements!
17:56 What's coming next?
π Website: thecodingtrain.com
πΎ Share Your Creation! thecodingtrain.com/Guides/community-contribution-guide.html
π© Suggest Topics: github.com/CodingTrain/Rainbow-Topics
π‘ GitHub: github.com/CodingTrain
π¬ Discord: discord.gg/hPuGy2g
π Membership: youtube.com/thecodingtrain/join
π Store: standard.tv/codingtrain
π Books: amazon.com/shop/thecodingtrain
ποΈ Twitter: twitter.com/thecodingtrain
πΈ Instagram: instagram.com/the.coding.train
π₯ Coding Challenges: youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Intro to Programming: youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
π p5.js: p5js.org
π p5.js Web Editor: editor.p5js.org
π Processing: processing.org
π Code of Conduct: github.com/CodingTrain/Code-of-Conduct
In this video I demonstrate how to manage multiple Discord bot commands with "a command handler" built with CommonJS and require() in node.js.π» thecodingtrain.com/learning/bots/discord/06-command-handler.html
π₯ All videos: youtube.com/playlist?list=PLRqwX-V7Uu6avBYxeBSwF48YhAnSn_sA4
Links discussed in this video:
π Discord.js Guide Command handling: https://discordjs.guide/command-handling/#command-handling
π Intro Discord Bot (Coding Garden GitHub): github.com/CodingGarden/intro-discord-bot
π import (Mozilla Docs): developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import
π import (Node.js v13 Docs): nodejs.org/docs/latest-v13.x/api/esm.html#esm_import_statements
π Choo choo bot on Glitch: glitch.com/~choo-choo-bot-discord
Other videos mentioned in this video:
π₯ Coding Garden with CJ - Build a Discord bot: youtu.be/gzM7kj6gV5I
Timestamps:
0:00 Welcome Back!
0:39 Explain! What's a command handler?
3:03 Code! Create commands.js using gotMessage()
5:36 Try! Let's see if it works
6:26 Code! JavaScript files for each command
7:59 Code! Let's see if the message a valid command
9:27 Code! Object for looking up commands
11:11 Try! Test to see if the system works
12:00 Code! Call choochoo command from choochoo.js
13:54 Try! Ahh let's see if this works
14:04 Code! Add the gif command
15:14 Try! Let's try running it
15:49 Recap!
17:00 Possible Improvements!
17:56 What's coming next?
π Website: thecodingtrain.com
πΎ Share Your Creation! thecodingtrain.com/Guides/community-contribution-guide.html
π© Suggest Topics: github.com/CodingTrain/Rainbow-Topics
π‘ GitHub: github.com/CodingTrain
π¬ Discord: discord.gg/hPuGy2g
π Membership: youtube.com/thecodingtrain/join
π Store: standard.tv/codingtrain
π Books: amazon.com/shop/thecodingtrain
ποΈ Twitter: twitter.com/thecodingtrain
πΈ Instagram: instagram.com/the.coding.train
π₯ Coding Challenges: youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
π₯ Intro to Programming: youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
π p5.js: p5js.org
π p5.js Web Editor: editor.p5js.org
π Processing: processing.org
π Code of Conduct: github.com/CodingTrain/Code-of-Conduct










