What you will build
- 01A bot that responds to a text command, like replying with a message when someone types !ping
- 02A bot that reacts to a message event, such as auto-replying or flagging a keyword for moderation
- 03A bot connected to Discord's Gateway that stays online at no cost on a free-tier host
The path, stage by stage
Work through these free courses in order. Each stage links to the full course details, its platform, and what you walk away able to do.
| Stage | Course | Platform | Hours | What you gain |
|---|---|---|---|---|
| 1. Learn Python fundamentals | Intro to Python Programming | Khan Academy | 15 | Khan Academy's Intro to Python Programming gets you to the building blocks a bot runs on: variables, functions, loops, and conditionals. That is exactly the logic you write inside a bot's command and event handlers, so by the end you can read and write the Python that discord.py expects you to fill in. |
| 2. Work with APIs, JSON, and web data | Python for Everybody Specialization | Coursera | 120 | The Python for Everybody Specialization, and its Using Python to Access Web Data course in particular, teaches you to call web APIs and parse JSON responses. A Discord bot is nothing but API calls under the hood: discord.py wraps Discord's REST and WebSocket API, so this is the direct skill that turns bot code from copy-paste into something you understand and can debug. |
Why these courses, not the alternatives
We start with Khan Academy's Intro to Python Programming because it is genuinely beginner-first and free with no account paywall, so you write real Python from the first lesson instead of stalling on setup. We hand the second stage to Coursera's Python for Everybody, and specifically its Using Python to Access Web Data course, because that is the catalog's best free treatment of calling APIs and parsing JSON in Python, which is the one skill a Discord bot depends on most. Being honest: our catalog does not have a bot-specific course yet, so this is fundamentals plus APIs, and you learn the discord.py library itself from Discord's free official docs. That is the same route most working developers actually take, and these two courses cover everything underneath it.
Before you start
None. This is a true from-zero path that starts with Python from scratch.
What you walk away with
A Python Discord bot that responds to commands, reacts to message events, and stays online for free.
Start with the first course
Apply it with a code-along tutorial
Frequently asked questions
Do I need to know Python before building a Discord bot?
Where do I run a Discord bot for free 24/7?
Do I need Discord Nitro or a paid Discord plan to make a bot?
What is the difference between discord.py and discord.js?
Keep going on FreeCodingCourses
Where this build leads
Related builds