TaskBot is a simple and easy-to-use Discord bot for managing tasks in your server. It allows users to add tasks, delete tasks, mark tasks as completed, and view all tasks in a neat list. Tasks are stored in a SQLite database.
- ✨ Add tasks with descriptions.
- 🗑️ Remove tasks by their ID.
- ✅ Mark tasks as completed.
- 📝 List all tasks with their completion status.
- 💾 Persistent storage using SQLite database
- 🧪 Comprehensive test coverage
- Python 3.6+
- SQLite (bundled with Python by default)
- discord.py (Python library for interacting with Discord)
- dotenv (for handling environment variables)
-
Clone the repository:
git clone https://github.com/denizdagli/DiscordTaskManagerBot.git cd DiscordTaskManagerBot -
Install the required dependencies:
pip install -r requirements.txt
-
Create a .env file in the root directory of the project and add your Discord bot token:
DISCORD_TOKEN=your_bot_token
-
Create the database and initialize the bot:
python database.py
-
Run the bot:
python bot.py
Now, the bot will be running and ready to interact with users on your server!
-
!add <task description>: Adds a new task to the list. Example:!add Buy groceries -
!delete <task ID>: Deletes a task by its ID. Example:!delete 1 -
!show: Displays a list of all tasks. Example:
1. Buy groceries ❌
2. Complete project ✅
!complete <task ID>: Marks a task as completed by its ID. Example:!complete 1
taskbot/
│
├── bot.py # Bot file that runs the bot
├── database.py # SQLite database operations
├── commands.py # Command handling functions
├── .env # Discord token for bot authentication
├── requirements.txt # Required Python dependencies
└── README.md # This file
└── tests/ # Test folder
├── __init__.py # This file makes the tests/ folder a Python package
├── test_add_task.py
└── test_complete_task.py
└── test_delete_task.py
└── test_show_task.py
pytest tests/- Fork the repository
- Create a new branch:
git checkout -b feature-name - Make your changes and commit:
git commit -m 'Add some feature' - Push to the branch:
git push origin feature-name - Submit a pull request
Thanks to the Discord.py team for their excellent library