Notify you in Discord when a website changes:

List of features of the site-watcher bot:
- Add multiple sites to watcher
- Remove site from watcher
- Monitoring specified elements of a site, to not get notified on dynamic elements (ex. ads)
- Checking on a specified interval (1-60 minutes, default
5). - Show list of tracked sites
- Monitor Apple Carrier Bundles (
Carrier) - Monitor Apple Pay Configurations (
ApplePay) - Monitor Apple eSIM Carrier Support (
AppleEsim) - Monitor Apple Feature Availability (
AppleFeature) - Monitor Solotodo Deals (
Deal) - Modular Channel Handlers for specialized channel behavior (Moderation, Q&A)
- Open source!
- Go to the Discord Developer Portal.
- Click New Application and give it a name.
- Navigate to the Bot tab:
- Reset/Copy the Bot Token (you'll need this later).
- Under the Privileged Gateway Intents section, enable the Message Content Intent.
- Navigate to the OAuth2 tab, then the URL Generator sub-menu:
- Scopes: Select
botandapplications.commandsfrom the list. - Bot Permissions: Once
botis selected, a permission list will appear. Select the following:- General Permissions:
View Channels. - Text Permissions:
Send Messages,Send Messages in Threads,Create Public Threads,Manage Messages,Embed Links,Attach Files,Read Message History, andUse Slash Commands.
- General Permissions:
- Copy the generated URL at the bottom and use it to invite the bot to your server.
- Scopes: Select
- Make sure you have git and Node.js (v16.11.0 or higher) installed.
- Clone the repository:
git clone https://github.com/alcayaga/djs-site-watcher.git cd djs-site-watcher - Install dependencies:
npm install
-
Create a
.envfile from the.env.example:cp .env.example .env
-
Fill in the required fields in
.env:DISCORDJS_BOT_TOKEN: Your bot token from step 1.DISCORDJS_CLIENT_ID: Found in the "General Information" tab of your application.
-
Configure the bot in
config/settings.json:defaultChannelId: The ID of the channel where notifications will be sent.monitors: CustomizechannelIdandapiDelayfor specific monitors.channels: Configure specific IDs and delays for Q&A or Deals moderation.interval: The refresh rate in minutes (default5).
Note: Using settings.json is the recommended way to manage configuration.
- Register Slash Commands: Run this once or whenever commands are updated:
npm run deploy
- Start the Bot:
npm start
Once the bot is online:
- In Discord, use the
/addcommand to start monitoring a website. - By default, only users with
Manage Serverpermission can use the bot's commands. You can customize this inServer Settings → Integrations. - Use
/helpto see all available commands.
Note: The default watch interval is 5 minutes. You can change it globally with /interval or per-monitor if configured in config/settings.json.
For all other options, see Commands.
Show all the available commands.
Adds a website to the list by opening a form.
The form will ask for:
- URL: The website address to monitor.
- CSS Selector (Optional): Specifies which part of the site to track. By default, the
<head>is tracked. To avoid false alerts from dynamic content like ads, it's best to provide a specific selector. - Force add (Optional): If you enter
yes, the site will be added even if the bot cannot currently fetch it (e.g., it returns a 404). This is useful for monitoring sites that are not yet live.
Tip: In Chrome, you can get a selector by right-clicking the part of the site you want to track and selecting Inspect. In the developer view, right-click the highlighted element and select Copy → Copy selector.
Example
/add This opens the pop-up form.
Removes a website from the list by opening an interactive dropdown menu.
Example
/remove This opens a dropdown where you can select the site to remove.
Shows the list of websites being watched. Includes a button to quickly remove sites.
Set the interval/refresh rate of the watcher. Default 5 minutes.
Parameters
minutes: The interval in minutes (minimum of 1, maximum of 60).
Example
/interval minutes:10 Sets the interval to 10 minutes.
Manage the monitors.
Subcommands
start: Start a monitor.stop: Stop a monitor.status: Show status.check: Trigger a manual check.
Parameters
name (Optional): The name of the monitor (e.g., Site, Carrier, AppleEsim, ApplePay, AppleFeature). Defaults to all. Autocomplete is enabled.
Example
/monitor status Shows the status of all monitors.
/monitor check name:Carrier Triggers a check for the Carrier monitor.
The bot includes a modular system to handle messages in specific channels differently.
Automatically responds to messages matching regex patterns defined in config/responses.json.
- Trigger: Configured via
channelIdinconfig/settings.json. - Behavior: Sends text or image replies based on triggers.
Enforces a "deals-only" policy in a specific channel.
- Trigger: Configured via
channelIdinconfig/settings.json. - Behavior:
- Allows messages containing a link or an image.
- Deletes all other messages and sends a private message to the user asking them to use threads for discussion.
Version 3.1.0 moves advanced configuration (channel IDs and delays) from environment variables to config/settings.json.
- Centralized Config: Use
config/settings.jsonto manage all monitor and channel settings. - Legacy Support: Environment variables like
DISCORDJS_TEXTCHANNEL_ID,DISCORDJS_APCHANNEL_ID, andDISCORDJS_DEALS_CHANNEL_IDare now deprecated and will be removed in future versions. - Automatic Backfill: If
settings.jsonis missing these values, the bot will still attempt to use the legacy environment variables if they are set.
Version 3.0.0 introduces Discord Slash Commands.
- Client ID: You must add
DISCORDJS_CLIENT_ID=to your.envfile. Find this in the Discord Developer Portal under "General Information". - Deploy Commands: Run
npm run deployto register the new slash commands with Discord. - Command Prefix: The
!prefix is removed. Use slash commands (e.g.,/help) instead.
Version 2.0.0 introduces a new configuration structure.
Automatic Migration:
The bot will automatically attempt to move your legacy JSON configuration files from src/ to the new config/ directory upon the first run of v2.0.0. It will also patch the internal file paths in settings.json.
Manual Migration (Optional): If you prefer to migrate manually:
- Create a
config/directory at the project root. - Move all
.jsonfiles fromsrc/toconfig/. - In
config/settings.json, update any"file": "./src/..."entries to"file": "./config/...".
If you suspect false positive alerts (e.g., "Back to Historic Low" when the price never changed), check the logs for:
[DealMonitor] Price change for ...
This log entry records every price movement (up or down), including the product ID, name, old price, new price, and stored minimum.
- Phantom Spike: You will see a price INCREASE log followed immediately by a price DECREASE log in the next check cycle.
- Legitimate Change: The price will stabilize at the new value.
This project is licensed under the MIT License - see the LICENSE file for details