Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” DiscordWebhookMonitor

Python License Stars Issues

A lightweight Discord webhook monitoring bot that continuously checks multiple Discord webhooks and sends instant notifications when a webhook becomes unavailable or comes back online.

Designed for developers, server administrators, and automation projects that rely on Discord webhooks.


✨ Features

  • πŸ” Monitor multiple Discord webhooks simultaneously
  • ⚑ Automatic webhook availability checks
  • 🚨 Instant Discord alerts when a webhook becomes unavailable
  • βœ… Recovery notifications when a webhook becomes active again
  • πŸ“‹ Detailed logging system (file + console)
  • ⏱️ Fully configurable monitoring intervals
  • πŸš€ Fully asynchronous architecture using asyncio and aiohttp
  • πŸ’Ύ Smart webhook URL caching for improved performance
  • πŸ›‘οΈ Handles invalid, deleted, and unavailable webhooks

πŸ“– How It Works

Discord webhooks can become unavailable when they are deleted, invalidated, or modified.

DiscordWebhookMonitor solves this by continuously checking your configured webhooks and notifying you immediately when a problem occurs.

Monitoring Process

  1. Resolve the webhook URL from the configured source.
  2. Send a request to check the webhook status.
  3. Detect unavailable webhooks (HTTP 401, 403, 404).
  4. Send an alert message to your Discord channel.
  5. Detect when the webhook becomes available again.
  6. Save monitoring events to log files.

πŸ“‚ Project Structure

DiscordWebhookMonitor/
β”‚
β”œβ”€β”€ app.py
β”œβ”€β”€ config.json
β”œβ”€β”€ .env
β”œβ”€β”€ requirements.txt
β”‚
└── logs/
    └── bot.log

βš™οΈ Configuration

Environment Variables

Create a .env file:

BOT_TOKEN=YOUR_DISCORD_BOT_TOKEN

Config File

Example config.json:

{
  "alert_channel_id": 123456789012345678,
  "check_interval_seconds": 600,
  "webhooks": [
    {
      "name": "Example Webhook",
      "url": "https://pastebin.com/raw/example"
    }
  ]
}

Configuration Options

Option Description
alert_channel_id Discord channel where alerts are sent
check_interval_seconds Delay between webhook checks
webhooks List of monitored webhooks
name Webhook display name used in notifications
url External source containing the webhook URL

πŸš€ Installation

1. Clone the repository

git clone https://github.com/Peppy187/DiscordWebhookMonitor.git
cd DiscordWebhookMonitor

2. Install dependencies

pip install -r requirements.txt

3. Configure environment variables

Create:

.env

Add:

BOT_TOKEN=YOUR_DISCORD_BOT_TOKEN

4. Configure webhooks

Edit:

config.json

Add your monitored webhooks and alert channel.

5. Start the bot

python app.py

πŸ“¦ Requirements

  • Python 3.10+
  • discord.py
  • aiohttp
  • python-dotenv

Install manually:

pip install discord.py aiohttp python-dotenv

πŸ“ Logging

All monitoring activity is stored in:

logs/bot.log

Example output:

2026-07-31 15:30:01 | INFO | [DrAyri] HTTP status: 200
2026-07-31 15:40:01 | WARNING | [DrAyri] webhook unavailable (404)
2026-07-31 15:50:01 | INFO | [DrAyri] webhook active

πŸ“’ Example Notifications

Webhook Unavailable

⚠️ @everyone Webhook unavailable: DrAyri

Webhook Restored

βœ… Webhook restored: DrAyri

πŸ”§ Built With

  • 🐍 Python
  • πŸ€– discord.py
  • ⚑ asyncio
  • 🌐 aiohttp
  • πŸ” python-dotenv

πŸ›£οΈ Roadmap

Planned improvements:

  • Docker support
  • Web dashboard
  • Uptime statistics
  • Database logging
  • Advanced Discord embeds
  • Multi-server support

⚠️ Disclaimer

This project is intended for monitoring and administrative purposes only.

Always follow Discord's Terms of Service and applicable platform rules when using webhooks or automation tools.


πŸ“„ License

This project is licensed under the MIT License.


⭐ Support

If you find this project useful, consider giving it a star on GitHub!

About

A lightweight Python Discord bot that monitors webhook availability and sends instant alerts when webhooks go offline.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages