# How to Configure Discord Webhook Notifications for Azeroth Auction Assassin (AAA)

> Easily set up Discord webhook notifications for Azeroth Auction Assassin. Get automatic scan alerts by configuring your webhook URL in mega_data.json or the GUI. Start receiving AAA notifications now.

- Repository: [FF14 Advanced Market Search/azerothauctionassassin](https://github.com/ff14-advanced-market-search/azerothauctionassassin)
- Tags: how-to-guide
- Published: 2026-03-01

---

**To configure Discord webhook notifications for AAA, create a webhook URL in your Discord server settings, add it to the `MEGA_WEBHOOK_URL` field in your [`mega_data.json`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/mega_data.json) configuration file or via the Settings GUI, and restart the application to enable automatic scan alerts.**

Azeroth Auction Assassin (AAA) is an open-source World of Warcraft auction house scanner that pushes real-time deal alerts directly to Discord channels. Configuring Discord webhook notifications for AAA ensures you receive instant updates when the bot finds items matching your price thresholds, eliminating the need to monitor the application window constantly.

## Setting Up Your Discord Webhook URL

Before AAA can send notifications, you must generate a webhook endpoint in your Discord server.

### Creating the Webhook in Discord

Navigate to your Discord server and select the channel where you want auction alerts to appear. Click the channel settings (gear icon), choose **Integrations**, then **Webhooks**. Click **New Webhook**, give it a descriptive name like "AAA Alerts", and copy the generated URL. The URL follows the format `https://discord.com/api/webhooks/<id>/<token>`.

### Locating the Configuration File

AAA stores persistent settings in [`AzerothAuctionAssassinData/mega_data.json`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/AzerothAuctionAssassinData/mega_data.json). If you prefer editing files directly over using the GUI, locate this file in your installation directory. The repository provides an example template at [`AzerothAuctionAssassinData/example_mega_data.json`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/AzerothAuctionAssassinData/example_mega_data.json) demonstrating the required structure.

## Configuring AAA to Use the Webhook

You can provide the Discord webhook URL to AAA through three different methods, depending on your deployment preference.

### Method 1: Using the GUI Settings

The simplest approach is through the application's Settings tab. In [`AzerothAuctionAssassin.py`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/AzerothAuctionAssassin.py), the GUI initializes a `QLineEdit` input field labeled "Discord Webhook". When you paste your webhook URL into this field and save, the application writes the value to the JSON configuration. The save operation maps `self.discord_webhook_input.text().strip()` to the `MEGA_WEBHOOK_URL` key in [`mega_data.json`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/mega_data.json) (lines 2653-2655).

When loading an existing config, the GUI populates the field using `self.discord_webhook_input.setText(raw_mega_data["MEGA_WEBHOOK_URL"])` (lines 1387-1389).

### Method 2: Editing mega_data.json Directly

For headless setups or configuration management, edit the JSON file directly. Add or update the `MEGA_WEBHOOK_URL` field with your copied Discord webhook URL:

```json
{
  "MEGA_WEBHOOK_URL": "https://discord.com/api/webhooks/123456789012345678/ABCdefGHIjklMNOpqrSTuvwxYZ",
  "WOW_CLIENT_ID": "$WOW_CLIENT_ID",
  "WOW_CLIENT_SECRET": "$WOW_CLIENT_SECRET",
  "WOW_REGION": "EU",
  "EXTRA_ALERTS": "[]",
  "SHOW_BID_PRICES": false,
  "MEGA_THREADS": 48,
  "WOWHEAD_LINK": false,
  "USE_POST_MIDNIGHT_ILVL": true
}

```

Save this as [`AzerothAuctionAssassinData/mega_data.json`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/AzerothAuctionAssassinData/mega_data.json).

### Method 3: Environment Variables

The `MegaData` class in [`utils/mega_data_setup.py`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/utils/mega_data_setup.py) checks for the `MEGA_WEBHOOK_URL` environment variable before falling back to the JSON file (lines 56-62). This is useful for Docker deployments or CI/CD pipelines where you want to inject secrets without modifying files:

```bash
export MEGA_WEBHOOK_URL="https://discord.com/api/webhooks/123456789012345678/ABCdefGHIjklMNOpqrSTuvwxYZ"
python AzerothAuctionAssassin.py

```

## How Discord Notifications Work in AAA

Understanding the internal flow helps troubleshoot issues and customize alerts.

### The MegaData Class and Webhook Initialization

When AAA starts, the `MegaData` class loads configuration in [`utils/mega_data_setup.py`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/utils/mega_data_setup.py). It resolves the webhook URL from either the environment variable or the `MEGA_WEBHOOK_URL` JSON field, storing it in `self.WEBHOOK_URL`. If neither source provides a URL, the application raises an exception to prevent silent failures.

The class provides wrapper methods that expose the webhook functionality to the rest of the application:

```python
def send_discord_message(self, message):
    send_discord_message(message, self.WEBHOOK_URL)

def send_discord_embed(self, embed):
    send_embed_discord(embed, self.WEBHOOK_URL)

```

These methods are defined in [`utils/mega_data_setup.py`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/utils/mega_data_setup.py) (lines 24-30).

### Sending Plain Text Alerts

For simple notifications, AAA uses `send_discord_message` in [`utils/api_requests.py`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/utils/api_requests.py) (lines 7-14). This helper posts a JSON payload `{"content": message}` to the webhook URL using `requests.post`. The function includes automatic retry logic (three attempts) for transient network failures.

### Sending Rich Embed Alerts

For detailed auction alerts, AAA constructs Discord embeds in [`mega_alerts.py`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/mega_alerts.py) and sends them via `send_discord_embed` (which calls `send_embed_discord` in [`api_requests.py`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/api_requests.py) lines 33-55). These embeds include color-coded headers, item names, gold prices, and optional Wowhead links. The embed creation logic in [`mega_alerts.py`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/mega_alerts.py) (lines 95-108) assembles the payload, and the final send is performed via `mega_data.send_discord_embed(item_embed)`.

## Testing Your Discord Webhook Configuration

Verify your setup before running full scans. You can test the connection using Python interactively:

```python
from utils.mega_data_setup import MegaData

# Load configuration (uses the JSON file you just edited)

mega = MegaData()

# Simple text alert

mega.send_discord_message("AAA is now configured for Discord notifications!")

# Rich embed example (same format that the scanner uses)

test_embed = {
    "title": "Configuration Test",
    "description": "Azeroth Auction Assassin test alert",
    "color": 0x00FF00,
    "fields": [
        {"name": "Region", "value": mega.REGION, "inline": True},
        {"name": "Status", "value": "Connected", "inline": True},
    ],
}
mega.send_discord_embed(test_embed)

```

If both messages appear in your Discord channel, the configuration is working correctly.

## Troubleshooting Common Issues

- **No notifications appearing**: Verify the `MEGA_WEBHOOK_URL` value in [`mega_data.json`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/mega_data.json) matches the URL copied from Discord exactly. Check that the webhook hasn't been deleted or regenerated in Discord settings.
- **Environment variable not recognized**: Ensure `MEGA_WEBHOOK_URL` is exported in the same shell session before launching AAA. The application checks this variable before reading the JSON file in [`utils/mega_data_setup.py`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/utils/mega_data_setup.py).
- **Embed formatting errors**: If rich embeds fail but plain text works, check that your embed JSON follows Discord's schema strictly. Missing required fields like `title` or malformed `color` values (must be integer) will cause 400 errors.
- **Network timeouts**: The retry logic in [`utils/api_requests.py`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/utils/api_requests.py) attempts three times before failing. Persistent timeouts suggest firewall rules or Discord API issues rather than configuration problems.

## Summary

- **Discord webhook notifications** in Azeroth Auction Assassin require a valid webhook URL from your Discord server settings.
- **Configuration methods** include the GUI Settings tab, direct editing of [`mega_data.json`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/mega_data.json), or setting the `MEGA_WEBHOOK_URL` environment variable.
- **Core files** handling notifications are [`utils/mega_data_setup.py`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/utils/mega_data_setup.py) for configuration loading and [`utils/api_requests.py`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/utils/api_requests.py) for the actual HTTP requests.
- **Alert types** range from simple text messages to rich Discord embeds containing item details, prices, and Wowhead links.
- **Testing** can be done interactively using the `MegaData` class methods before running live scans.

## Frequently Asked Questions

### Where do I find the Discord webhook URL?

Navigate to your Discord server's channel settings, select **Integrations**, then **Webhooks**. Click **New Webhook**, choose the target channel, and copy the URL. It follows the format `https://discord.com/api/webhooks/<id>/<token>`. Paste this into AAA's Settings tab or the `MEGA_WEBHOOK_URL` field in your JSON configuration.

### Can I use multiple Discord webhooks with AAA?

The current implementation in [`utils/mega_data_setup.py`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/utils/mega_data_setup.py) supports a single webhook URL stored in `self.WEBHOOK_URL`. To send alerts to multiple channels, you would need to modify the source code to iterate over a list of URLs, or use a Discord bot that forwards messages from a single webhook to multiple channels.

### What format do AAA Discord alerts use?

AAA sends two types of notifications: **plain text** messages for simple alerts (via `send_discord_message` in [`utils/api_requests.py`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/utils/api_requests.py)) and **rich embeds** for detailed auction data (via `send_discord_embed`). Embeds include color-coded headers, item names, gold prices, and optional Wowhead links, formatted according to Discord's embed API specification as implemented in [`mega_alerts.py`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/mega_alerts.py).

### Why are my Discord notifications not working?

First, verify that `MEGA_WEBHOOK_URL` is correctly set in [`mega_data.json`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/mega_data.json) or as an environment variable, as loaded by `MegaData.__init__` in [`utils/mega_data_setup.py`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/utils/mega_data_setup.py). Check that the webhook hasn't been deleted in Discord. If the configuration is correct but messages still fail, check the console for errors from [`utils/api_requests.py`](https://github.com/ff14-advanced-market-search/azerothauctionassassin/blob/main/utils/api_requests.py), which will indicate whether the issue is network connectivity, invalid JSON formatting, or Discord API rate limiting.