Skip to content

Repository files navigation

Discord Reminder Bot 🤖⏰

A powerful Discord bot that helps you set and manage reminders with support for repeating reminders, flexible time formats, and web monitoring.

Features ✨

  • Personal Reminders - Set reminders that mention only you
  • Everyone Reminders - Set reminders that mention @everyone (requires permissions)
  • Repeating Reminders - Set reminders that repeat at custom intervals
  • Flexible Time Formats - Support for relative time, shortcuts, and exact timestamps
  • Web Interface - Built-in web server for monitoring and health checks
  • Persistent Storage - Reminders are saved to JSON file and persist across restarts

Commands 📝

Basic Commands

  • !remind <time> <message> - Set a personal reminder
  • !remindall <time> <message> - Set a reminder that mentions @everyone
  • !myreminders - List all your active reminders
  • !deletereminder <id> - Delete a specific reminder
  • !stoprepeat <id> - Stop a repeating reminder
  • !help - Show detailed help information

Time Formats

  • Relative: 5m, 2h, 3d (minutes, hours, days)
  • Shortcuts: tomorrow_9am, today_3pm
  • Exact: 2024-12-25_18:00 (YYYY-MM-DD_HH:MM)

Repeating Reminders

Add repeat:<interval> to any reminder:

  • repeat:30m - Every 30 minutes
  • repeat:2h - Every 2 hours
  • repeat:1d - Every day

Add until:<time> to stop at a specific time:

  • until:5pm - Stop at 5 PM today
  • until:tomorrow_6pm - Stop tomorrow at 6 PM

Example: !remind 9am repeat:1h until:5pm Status check

Installation 🚀

Prerequisites

  • Python 3.8+
  • Discord Bot Token
  • Discord Server with appropriate permissions

Setup

  1. Clone the repository

    git clone <repository-url>
    cd reminder-bot
  2. Install dependencies

    pip install -r requirements.txt
  3. Configure environment variables

    cp .env.example .env

    Edit .env with your configuration:

    DISCORD_BOT_TOKEN=your_discord_bot_token_here
    DISCORD_CHANNEL_ID=your_default_channel_id_here
    REMINDERS_FILE=reminders.json
    CHECK_INTERVAL=30
    COMMAND_PREFIX=!
  4. Run the bot

    python main.py

Configuration ⚙️

Environment Variables

Variable Description Default
DISCORD_BOT_TOKEN Your Discord bot token Required
DISCORD_CHANNEL_ID Default channel ID for reminders Required
REMINDERS_FILE File to store reminders reminders.json
CHECK_INTERVAL How often to check for due reminders (seconds) 30
COMMAND_PREFIX Bot command prefix !

Discord Bot Setup

  1. Go to Discord Developer Portal
  2. Create a new application
  3. Go to "Bot" section and create a bot
  4. Copy the bot token to your .env file
  5. Enable "Message Content Intent" in bot settings
  6. Invite bot to your server with appropriate permissions:
    • Send Messages
    • Use Slash Commands
    • Mention Everyone (for !remindall command)

Web Interface 🌐

The bot includes a built-in web server that provides:

  • Home Page (/) - Status dashboard with bot information
  • Health Check (/health) - JSON health status for monitoring
  • Ping (/ping) - Simple ping endpoint

The web server runs on port 8080 by default and is useful for:

  • Monitoring bot status
  • Deployment health checks (Render, Heroku, etc.)
  • Keeping the bot alive on cloud platforms

File Structure 📁

reminder-bot/
├── main.py              # Application entry point
├── reminder_bot.py      # Discord bot implementation
├── reminder_service.py  # Reminder storage and management
├── web_server.py        # Flask web server
├── config.py           # Configuration management
├── requirements.txt    # Python dependencies
├── .env.example       # Environment variables template
├── .gitignore         # Git ignore rules
└── README.md          # This file

Usage Examples 💡

Basic Reminders

!remind 5m Take a break
!remind 2h Meeting with team
!remind tomorrow_9am Daily standup

Repeating Reminders

!remind 9am repeat:1h until:5pm Hourly check-in
!remind tomorrow_10am repeat:1d Daily standup
!remindall 1h repeat:4h Server maintenance check

Managing Reminders

!myreminders                    # List your reminders
!deletereminder 123456_1234567890.0  # Delete specific reminder
!stoprepeat 123456_1234567890.0      # Stop repeating reminder

Deployment 🚀

Local Development

python main.py

Production Deployment

The bot is designed to work with cloud platforms like Render, Heroku, or Railway:

  1. Set environment variables in your platform
  2. The web server keeps the bot alive and provides health checks
  3. Reminders are stored in reminders.json (consider using a database for production)

Logging 📊

The bot logs to both console and reminder_bot.log file:

  • INFO: General operations and reminder activities
  • WARNING: Non-critical issues
  • ERROR: Critical errors with full stack traces

Contributing 🤝

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License 📄

This project is open source and available under the MIT License.

Support 💬

If you encounter any issues or have questions:

  1. Check the logs in reminder_bot.log
  2. Verify your .env configuration
  3. Ensure the bot has proper Discord permissions
  4. Check the web interface at http://localhost:8080 for status

Built with ❤️ using Python, Discord.py & Flask

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages