Skip to content

Add how-to-make-a-discord-bot-python materials folder - #1014

Merged
realpython-bot merged 2 commits into
masterfrom
maintenance/how-to-make-a-discord-bot-python-20261205
Dec 6, 2026
Merged

realpython-bot merged 2 commits into
masterfrom
maintenance/how-to-make-a-discord-bot-python-20261205

Conversation

@realpython-bot

Copy link
Copy Markdown
Collaborator

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).

  • 13 scripts, one per tutorial stage, copied from the update draft's listings (discord.py 2.x intents everywhere). The deliberate-failure snippets (runaway birthday handler, !roll_dice without converters) are left out; the fixed versions ship.
  • requirements.txt pins discord.py==2.7.1 and python-dotenv==1.2.4, matching the article's dependencies field. README floor: Python 3.8 (minimum-python).
  • .env.example for the token and guild name; .env is 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_ready output, 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, and dircheck.py pass.

🤖 Generated with Claude Code

realpython-bot and others added 2 commits December 5, 2026 22:19
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
realpython-bot merged commit 4d29354 into master Dec 6, 2026
1 check passed
@realpython-bot
realpython-bot deleted the maintenance/how-to-make-a-discord-bot-python-20261205 branch December 6, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant