Skip to content

A simple Discord bot for managing tasks efficiently. Users can add, complete, delete, and view tasks directly from Discord.

Notifications You must be signed in to change notification settings

denizdagli/DiscordTaskManagerBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TaskBot - Discord Task Management Bot

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.

Features

  • ✨ 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

Installation

Requirements

  • Python 3.6+
  • SQLite (bundled with Python by default)
  • discord.py (Python library for interacting with Discord)
  • dotenv (for handling environment variables)

Steps to Install

  1. Clone the repository:

    git clone https://github.com/denizdagli/DiscordTaskManagerBot.git
    cd DiscordTaskManagerBot
    
  2. Install the required dependencies:

    pip install -r requirements.txt
    
  3. Create a .env file in the root directory of the project and add your Discord bot token:

    DISCORD_TOKEN=your_bot_token
    
  4. Create the database and initialize the bot:

    python database.py
    
  5. Run the bot:

    python bot.py
    

Now, the bot will be running and ready to interact with users on your server!

Available Commands

  • !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

File Structure

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   

Testing

pytest tests/

Contributing

  1. Fork the repository
  2. Create a new branch: git checkout -b feature-name
  3. Make your changes and commit: git commit -m 'Add some feature'
  4. Push to the branch: git push origin feature-name
  5. Submit a pull request

And

Thanks to the Discord.py team for their excellent library

About

A simple Discord bot for managing tasks efficiently. Users can add, complete, delete, and view tasks directly from Discord.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages