Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference file structure #44

Open
KDwevedi opened this issue Nov 26, 2023 · 0 comments
Open

Reference file structure #44

KDwevedi opened this issue Nov 26, 2023 · 0 comments

Comments

@KDwevedi
Copy link
Contributor

Version 1 of a scalable file structure:

my_discord_bot/
│
├── cogs/                       # Directory for all your cogs
│   ├── listeners/              # Cogs specifically for event listeners
│   │   ├── __init__.py
│   │   ├── member_events.py    # Example: Handling member join/leave events
│   │   └── message_events.py   # Example: Handling message events
│   │
│   ├── commands/               # Cogs for command handling
│   │   ├── __init__.py
│   │   ├── moderation.py       # Example: Moderation related commands
│   │   └── fun_commands.py     # Example: Fun or miscellaneous commands
│   │
├── entities/                   # Directory for custom entity classes
│   ├── __init__.py
│   ├── user.py                 # Example: Custom user entity
│   └── guild.py                # Example: Custom guild entity
│
├── interfaces/                 # Interfaces for external services
│   ├── __init__.py
│   ├── supabase_interface.py   # Interface class for Supabase
│   └── other_service.py        # Other external service interfaces
│
├── utils/                      # Utility functions and classes
│   ├── __init__.py
│   ├── helpers.py              # Helper functions
│   └── logger.py               # Logging utility
│
├── config/                     # Configuration files
│   ├── __init__.py
│   ├── config.py               # General bot configuration
│   └── secrets.py              # Secrets like tokens, passwords, etc.
│
├── tests/                      # Unit tests for your bot
│   ├── __init__.py
│   ├── test_commands.py        # Test cases for commands
│   └── test_listeners.py       # Test cases for listeners
│
├── .env                        # Environment variables file
├── main.py                     # Main bot file
├── requirements.txt            # List of dependencies
└── README.md                   # Project documentation
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

No branches or pull requests

1 participant