https://github.com/fallendeity/discord.py-masterclass
A tutorial/guide explaining all features in discord.py and how to make a discord bot from scratch.
https://github.com/fallendeity/discord.py-masterclass
discord-bot discord-py python tutorial
Last synced: 4 months ago
JSON representation
A tutorial/guide explaining all features in discord.py and how to make a discord bot from scratch.
- Host: GitHub
- URL: https://github.com/fallendeity/discord.py-masterclass
- Owner: FallenDeity
- License: mit
- Created: 2023-07-01T04:39:39.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-03-18T17:40:13.000Z (10 months ago)
- Last Synced: 2025-03-18T18:46:35.607Z (10 months ago)
- Topics: discord-bot, discord-py, python, tutorial
- Homepage: https://fallendeity.github.io/discord.py-masterclass/
- Size: 18.6 MB
- Stars: 35
- Watchers: 2
- Forks: 5
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Discord.py Masterclass
[](https://github.com/FallenDeity/discord.py-masterclass/actions/workflows/format-and-lint.yml)
[](https://opensource.org/licenses/MIT)
[](https://www.python.org/downloads/)
[](https://github.com/Rapptz/discord.py)
A comprehensive guide and example collection for building Discord bots with discord.py. This repository serves as a masterclass for both beginners and experienced developers looking to create feature-rich Discord bots.
## Documentation
Visit our [comprehensive documentation](https://fallendeity.github.io/discord.py-masterclass/) to learn about:
- Creating your first Discord bot
- Understanding slash commands and hybrid commands
- Working with views, buttons, and interactive components
- Implementing cogs for better code organization
- Creating custom converters and checks
- Building pagination systems
- Error handling best practices
- Audio playback functionality
- Custom help commands
- And much more! ✨
## Quick Start
### Prerequisites
- Python 3.9 or higher
- Git
- A Discord account and a bot token ([Get one here](https://discord.com/developers/applications))
### Installation
1. **Clone the repository**
```bash
git clone https://github.com/FallenDeity/discord.py-masterclass.git
cd discord.py-masterclass
```
2. **Install Poetry** (if you don't have it)
```bash
pip install poetry
```
3. **Install dependencies**
```bash
poetry install
```
4. **Windows users only**: Extra step for Cairo (required for documentation), use if cairo is giving you issues
```bash
pipwin install cairocffi
```
5. **Set up your bot token**
Create a `.env` file in the root directory:
```env
TOKEN=your_bot_token_here
```
6. **Run an example**
```bash
poetry run python examples/creating-a-bot/main.py
```
## Contributing
We love contributions! Whether you're fixing a bug, adding a new example, improving documentation, or suggesting new features, your help is appreciated.
Please read our [Contributing Guidelines](CONTRIBUTING.md) to get started. We welcome contributions of all kinds:
- Bug fixes
- New features and examples
- Documentation improvements
- Feature suggestions
## Development
### Running the Documentation Locally
```bash
poetry run mkdocs serve
```
Visit `http://127.0.0.1:8000/discord.py-masterclass/` to view the documentation.
### Code Quality
We use several tools to maintain code quality:
- **Black**: Code formatting
- **isort**: Import sorting
- **Ruff**: Fast Python linter
Run all checks:
```bash
poetry run black .
poetry run isort .
poetry run ruff check .
```
or use the pre-commit hooks:
```bash
poetry run pre-commit run --all-files
```
## Contributors
We appreciate all contributions from the community! A big thank you to everyone who has contributed to this project.

Triyan Mukherjee
💻

Vitness
💻

Mikołaj Kruczek
💻

thegamecracks
💻

Enrique Bos
💻

Snipy7374
💻

sarthak
💻

Krypton
💻
If you find this repository helpful, please consider giving it a star ⭐! It helps others discover this resource.