Creating a Discord Bot with JavaScript and Discord.js

Creating a Discord Bot with JavaScript and Discord.js

The Coding Train via YouTube Direct link

Listening for the command interaction and executing the command

10 of 14

10 of 14

Listening for the command interaction and executing the command

Class Central Classrooms beta

YouTube videos curated by Class Central.

Classroom Contents

Creating a Discord Bot with JavaScript and Discord.js

Automatically move to the next video in the Classroom when playback concludes

  1. 1 Introduction
  2. 2 Setting up the Node.js project
  3. 3 Creating the Discord application
  4. 4 Inviting your Discord bot
  5. 5 Enabling developer mode on Discord
  6. 6 Setting up the .env file
  7. 7 Code! Getting the bot to log into Discord
  8. 8 Creating a slash command
  9. 9 Deploying the slash command
  10. 10 Listening for the command interaction and executing the command
  11. 11 How Discord bots communicate with Discord
  12. 12 Discord.JS documentation
  13. 13 Intents describe what events your bot will receive and what it has access to. The guilds intent is required so discord.js can internally populate it's cache to limit it's API calls to Discord.
  14. 14 Using ./ means the import will be relative to the file that the import is made in. Without it the import would be absolute meaning it would be from the root of your Node.JS project

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.