An AI-powered Discord bot that helps you manage tasks, schedule events, and get help with commands using natural language.
- Task Management: Create and organize your tasks with simple commands
- Calendar Events: Schedule meetings and events automatically
- Command Help: Get explanations for any command or tool
- Smart Reminders: Never forget important tasks
- Easy to Use: Just type what you want in plain English
Use /task to create tasks with natural language:
Basic Examples:
/task Buy groceries tomorrow at 5pm
/task Call mom this weekend
/task Review quarterly report by Friday
/task Clean desk #organization
With Priority:
/task Urgent: Fix server issue #work #critical
/task Important presentation prep #work #high
/task Low priority: Organize desk #personal
With Tags (use #):
/task Buy groceries #shopping #personal
/task Review code #work #development #urgent
/task Schedule dentist #health #appointment
The bot automatically:
- Extracts the task title from your message
- Detects priority from keywords like "urgent", "important", "low"
- Finds due dates from phrases like "tomorrow", "next week", "3pm"
- Creates tags from words starting with #
- Sets default priority to "medium" if not specified
View your tasks:
/tasks # Shows all pending tasks
/tasks pending # Shows pending tasks only
/tasks completed # Shows completed tasks
/tasks in_progress # Shows tasks you're working on
Complete a task:
/complete 123 # Marks task #123 as done
Each task has:
- Title: What you need to do (auto-generated from your message)
- Description: Your full message
- Due Date: When it's due (if you mentioned a time)
- Priority: Low, Medium, High, or Urgent
- Status: Pending, In Progress, Completed, or Cancelled
- Tags: For organizing tasks (like #work, #personal)
/task <description>- Create a new task/tasks [status]- List your tasks (pending/completed/in_progress)/complete <task_id>- Mark a task as completed
/ask_personal <description>- Schedule a calendar event/set_timezone <timezone>- Set your timezone (e.g., Asia/Ho_Chi_Minh)
/help <query>- Get help with commands and tools/stats- See your usage statistics/system- System analytics (admin only)
- Go to Discord Developer Portal
- Click "New Application"
- Give your bot a name (like "My Task Bot")
- Go to the "Bot" section
- Click "Add Bot"
- Copy the Bot Token (you'll need this later)
-
OpenAI API Key:
- Go to platform.openai.com
- Sign up or log in
- Go to API Keys section
- Create a new key
-
FireCrawl API Key:
- Go to firecrawl.com
- Sign up for an account
- Get your API key
-
Create environment file:
cp discord_env_example.txt .env
-
Edit the .env file with your tokens:
DISCORD_BOT_TOKEN=your_bot_token_here OPENAI_API_KEY=your_openai_api_key_here FIRECRAWL_API_KEY=your_firecrawl_api_key_here USE_MCP=true DRY_RUN=false
-
Install Python dependencies:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
-
Start the MCP server (in one terminal):
python -m app.mcp.server
-
Start the bot (in another terminal):
USE_MCP=true python -m app.main
- In Discord Developer Portal, go to "OAuth2" → "URL Generator"
- Select "bot" scope
- Select these permissions:
- Send Messages
- Use Slash Commands
- Read Message History
- Copy the generated URL and open it in your browser
- Select your Discord server and click "Authorize"
- Type:
/task Buy milk tomorrow - The bot will create a task with:
- Title: "Buy Milk"
- Due Date: Tomorrow
- Priority: Medium
- Status: Pending
- Type:
/ask_personal Team meeting tomorrow 3pm for 1 hour - The bot will:
- Create a calendar event
- Send you a link to the event
- Add it to your Google Calendar (if connected)
- Type:
/help git commit - The bot will:
- Search for git commit documentation
- Give you a clear explanation
- Show you examples
- Type:
/tasks - The bot will show you all your pending tasks with:
- Task ID
- Title
- Due date
- Priority
- Tags
- Type:
/complete 1(where 1 is the task ID) - The bot will mark that task as completed
- Be specific with times: "3pm" is better than "later"
- Use tags for organization:
#work,#personal,#urgent - Set priorities: Use words like "urgent", "important", "low"
- Include context: "Call mom about dinner plans" is better than just "Call mom"
- "tomorrow" = tomorrow
- "next week" = next week
- "3pm" = today at 3pm
- "Friday 2pm" = Friday at 2pm
- "in 2 hours" = 2 hours from now
- Urgent: "urgent", "asap", "emergency", "critical"
- High: "important", "high", "priority"
- Low: "low", "whenever", "sometime"
- Medium: everything else
- Rate Limiting: Prevents API overuse
- Caching: Speeds up common requests
- Error Recovery: Automatic retry with backoff
- Usage Metrics: Track command usage and performance
- Intent Classification: Understands what you want to do
- Smart Routing: Sends requests to the right specialist
- Conversation Handling: Responds naturally to greetings and thanks
- Send messages via WhatsApp Business API
- Interactive buttons and quick replies
- Webhook handling for incoming messages
The bot uses Model Context Protocol (MCP) for clean specialist separation:
- PersonalSpecialist: Handles calendar events and scheduling
- CommandSpecialist: Provides help with commands and tools
- NLPSpecialist: Routes requests based on intent
- AnalyticsSpecialist: Provides usage statistics
create_event(user_id, summary, start_iso, end_iso)- Create calendar eventssearch_docs(query)- Search documentationlist_today(user_id)- List today's calendar eventspropose_slots(user_id, minutes, count)- Find free time slots
Set DRY_RUN=true to preview calls without side effects:
/ask_personal team sync tomorrow 3pm for 45m
→ DRY_RUN create_event {"user_id": 123, "summary": "Team Sync", "start_iso": "...", "end_iso": "..."}
- Check if the bot is online in your Discord server
- Make sure both the MCP server and bot are running
- Check the console for error messages
- Make sure you're using the latest version of the code
- Try being more specific: "Buy groceries" instead of just "groceries"
- You need to connect your Google account first
- Use
/connect_google(coming soon) - For now, use
/taskfor reminders
- Make sure you typed the command correctly (with the
/) - Check that the bot has the right permissions
- Try restarting the bot
- Verify your OpenAI API key has credits
- Check your FireCrawl API key is valid
- Ensure you have internet connectivity
- Make sure the bot has "Send Messages" permission in the channel
- Check that slash commands are enabled for the bot
app/
├── main.py # Bot entry point
├── cogs/discord_bot.py # Discord commands
├── agents/specialists.py # AI specialists (Personal, Command, NLP, Analytics)
├── tools/
│ ├── task_manager.py # Task management system
│ ├── google_calendar.py # Google Calendar integration
│ └── firecrawl_client.py # Documentation scraping
├── services/
│ ├── mcp_client.py # MCP client with retry logic
│ ├── metrics.py # Usage analytics
│ ├── cache.py # Response caching
│ ├── context.py # Context aggregation
│ ├── llm.py # Local LLM helper
│ └── whatsapp_client.py # WhatsApp integration
├── mcp/server.py # MCP server
├── utils/timeparse.py # Time parsing utilities
├── config.py # Configuration management
├── user_settings.py # User preferences
└── google_oauth.py # Google OAuth helper
The bot is designed to grow with your needs. Future features might include:
- WhatsApp Integration: Full WhatsApp Business API support
- Team Collaboration: Shared tasks and calendars
- Advanced Automation: Smart reminders and workflow automation
- Multi-platform: Slack, Microsoft Teams integration
- Voice Commands: Voice-to-task conversion
- AI Learning: Personalized suggestions based on usage
- Create new specialists in
app/agents/specialists.py - Add MCP tools in
app/mcp/server.py - Update Discord commands in
app/cogs/discord_bot.py - Use the metrics system for monitoring
- Use
DRY_RUN=truefor safe testing - Check logs for detailed debugging
- Use
/statsand/systemfor monitoring
If you're having trouble:
- Check the console for error messages
- Make sure all API keys are correct
- Verify the bot has the right permissions
- Try restarting both the MCP server and bot
- Use
DRY_RUN=trueto debug issues
This project is open source. Feel free to modify and share!