Join 200+ learners already leveling up
Teachly
Lessons/Build a Discord Bot in 15 Minutes
๐Ÿค–
FREE PREVIEW

2-minute preview available

FREE PREVIEW
15 min lesson
Coding15 minutes4.9312 students

Build a Discord Bot in 15 Minutes

A
Alex Chen@alexcodes
245K followers on TikTok

Self-taught dev who makes coding feel easy. 2,000+ students have built their first bot with me.

I'll walk you through building a fully functional Discord bot from zero. No CS degree needed. By the end of this lesson you'll have a bot running in your server that can moderate, welcome new members, and respond to custom commands.

Free Preview โ€” First 2 Minutes
0:00 โ€“ 2:00
By the end of the next 15 minutes, you'll have a working Discord bot running in your server. No prior coding experience needed โ€” I mean that. Here's what we're building: a bot that auto-welcomes new members with a custom message, responds to slash commands, and can moderate your server (auto-delete spam, warn users, etc.). Step 1: Go to discord.com/developers/applications and click 'New Application.' Name it whatever you want โ€” this is your bot's identity. Now click 'Bot' in the left sidebar and hit 'Add Bot.' Here's the part most tutorials skip: permissions. Click 'OAuth2' โ†’ 'URL Generator.' Check 'bot' and 'applications.commands.' Under bot permissions, select: Send Messages, Manage Messages, Read Message History, and Add Reactions. Copy the generated URL and paste it in your browser โ€” this lets you invite the bot to your server. Now let's write the code. Open Replit.com (it's free), create a new Node.js project, and type: npm install discord.js...

What you'll learn in the full 15 minutes

  • โœ“Setting up a Discord bot application and getting your token
  • โœ“Writing your first bot command in JavaScript
  • โœ“Adding auto-moderation and welcome messages
  • โœ“Deploying your bot so it runs 24/7 for free
๐Ÿ”’

Unlock the Full Lesson

Remaining 13 minutes including:

  • ๐Ÿ”‘Complete bot code with slash commands, auto-moderation, and welcome messages
  • ๐Ÿ”‘Error handling patterns so your bot never crashes
  • ๐Ÿ”‘How to deploy to Railway (free tier) so the bot runs 24/7
  • ๐Ÿ”‘Advanced: reaction roles, scheduled messages, and API integrations

"Over 2,000 students have built their first Discord bot using this lesson โ€” many now run bots for communities of 10K+ members."

What students are saying

"I literally had zero coding experience. My bot has been running 24/7 for 3 months now โ€” 15K member server."

โ€” Maya P.

"Best $5 I've ever spent. Built a moderation bot for my gaming community in one sitting."

โ€” Derek W.

"Alex explains things so clearly. I went from 'what is Node.js' to a working bot in under an hour."

โ€” Sana J.

Secure payment via Stripe ยท 7-day money-back guarantee ยท Instant access

No subscription. Pay once, keep forever.