Repository navigation
Add how-to-make-a-discord-bot-python materials folder - #1014
Merged
realpython-bot merged 2 commits intoDec 6, 2026
Merged
realpython-bot merged 2 commits into
realpython-bot merged 2 commits into
Conversation
Companion code for the updated How to Make a Discord Bot in Python tutorial (discord.py 2.7.1, python-dotenv 1.2.4). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
realpython-bot
deleted the
maintenance/how-to-make-a-discord-bot-python-20261205
branch
December 6, 2026 07:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the companion code for the updated tutorial How to Make a Discord Bot in Python (update draft: https://realpython.com/pbjt/blog/post/2539/change/, card: https://trello.com/c/teML8ZyH).
intentseverywhere). The deliberate-failure snippets (runaway birthday handler,!roll_dicewithout converters) are left out; the fixed versions ship.requirements.txtpinsdiscord.py==2.7.1andpython-dotenv==1.2.4, matching the article'sdependenciesfield. README floor: Python 3.8 (minimum-python)..env.examplefor the token and guild name;.envis already gitignored.Verified: no Discord bot token is available in CI or the review VM, so every script ran on discord.py 2.7.1 against a fake gateway (dpytest 0.7.0) on Python 3.15.2 and 3.14:
on_readyoutput,99!reply,raise-exception→err.log,!99,!roll_dice 2 6, and!create-channel→MissingRole+ error message.ruff@0.14.1 format --check,ruff check, anddircheck.pypass.🤖 Generated with Claude Code