Overview
Syllabus
Introduction
Setting up the Node.js project
Creating the Discord application
Inviting your Discord bot
Enabling developer mode on Discord
Setting up the .env file
Code! Getting the bot to log into Discord
Creating a slash command
Deploying the slash command
Listening for the command interaction and executing the command
How Discord bots communicate with Discord
Discord.JS documentation
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.
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
Taught by
The Coding Train