Create a Discord Bot with Slash Commands in 169 Seconds - Discord.js v13 Tutorial

Опубликовано: 13 Март 2025
на канале: Beau Carnes
28,905
585

Code a Discord bot with slash commands using Discord.js v13 and JavaScript.

Code: https://replit.com/@zizyo/DiscordBotJS

💬 Join the Zizyo Discord server and try out the bot:   / discord  
🔗 Discord.js Docs: https://discord.js.org/#/docs/main/st...

Command to install Node 16 on Replit:
npm init -y && npm i --save-dev node@16 && npm config set prefix=$(pwd)/node_modules/node && export PATH=$(pwd)/node_modules/node/bin:$PATH

Thanks to Replit for sponsoring this video! You can find their YouTube channel here:    / replityt  

0:00 Introduction
0:07 Setting up bot on Discord development portal
0:25 Sponsor message
0:28 Setting up development environment
0:32 Installing Node v16
0:49 Registering slash commands for Discord bot
0:55 Creating environment variables for secrets
1:33 Specifying commands to register
1:45 Making 'token' a variable
1:48 Running program to register commands
1:56 Creating initial bot program
2:11 Defining slash commands
2:20 Updating 'package.json' to run bot
2:25 Running bot
2:27 Testing bot
2:36 Making bot run continuously
2:45 Conclusion