A starter template for creating a Discord bot in Python. This template includes basic command handling, event listeners, automatic backups, a configurable dashboard, and utility functions for logging and configuration. Easily customizable for various bot functionalities.
- Basic command handling
- Event listeners
- Automatic backups
- Configurable dashboard
- Utility functions for logging and configuration
Follow these instructions to get a copy of the project up and running on your local machine.
- Python 3.8+
- Discord bot token
-
Clone the repository:
git clone https://github.com/DavyJonesCodes/DiscordBotStarter.git cd DiscordBotStarter
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Create a
.env
file with your bot token and other configurations:TOKEN=your-bot-token-here DEVELOPER=your-developer-id-here DATABASE=your-database-file-here
-
Run the bot:
python main.py
DiscordBotStarter/
│
├── .env.example # Example environment file with placeholder values
├── .gitignore # Specifies files and directories to ignore in Git
├── README.md # This README file
├── requirements.txt # Project dependencies
├── main.py # Main bot file
├── cogs/ # Directory for cog files
│ └── example_cog.py # Example cog file
├── jsonDB.py # JSON database handling script
└── data.json # JSON database file (if applicable)
- /hello: Sends a hello message with a button
- /sync: Syncs the commands (developer only)
- /refresh: Refreshes the commands (developer only)
- /ping: Checks the bot latency (developer only)
- /dashboard: Opens the dashboard (administrator only)
The dashboard allows you to view and update key settings for your server, including log channels and backup channels.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
For any inquiries or issues, please open an issue on the GitHub repository or contact the developer.
Happy coding! 🎉