this repo has no description
TypeScript 99.8%
Other 0.2%
3 1 0

Clone this repository

https://tangled.org/mmatt.net/dx-finder https://tangled.org/did:plc:tas6hj2xjrqben5653v5kohk/dx-finder
git@knot.tangled.wizardry.systems:mmatt.net/dx-finder git@knot.tangled.wizardry.systems:did:plc:tas6hj2xjrqben5653v5kohk/dx-finder

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

dx-finder#

Bun + TypeScript monitor that scrapes the maimai DX location page and tracks the cabinet closest to a target location (default: Nashville, TN).

When the closest cabinet changes from the previously saved result, it sends a Discord webhook.

Setup#

bun install

Configuration#

Environment variables:

  • WEBHOOK_URL (optional): Discord webhook URL to notify when closest cabinet changes.
  • STATE_FILE (optional): path to state JSON file. Defaults to state/closest-cabinet.json.
  • CHECK_INTERVAL_MINUTES (optional): how often to check. Defaults to 60.
  • TARGET_LAT (optional): target latitude. Must be set with TARGET_LON.
  • TARGET_LON (optional): target longitude. Must be set with TARGET_LAT.
  • TARGET_LABEL (optional): display name in logs/Discord. Defaults to Nashville, TN.

Example:

export WEBHOOK_URL='https://example.com/webhook'
export STATE_FILE='state/closest-cabinet.json'
export TARGET_LAT='36.1627'
export TARGET_LON='-86.7816'
export TARGET_LABEL='Nashville, TN'

Run#

bun run run

This is a long-running process. It checks once at startup, then keeps checking every hour (or your configured interval).

On first run, it initializes state and does not notify. On later runs, it compares the closest cabinet to the saved one and notifies only if changed.

Discord Message#

On change, it posts a formatted Discord message with:

  • summary line
  • embed containing previous/new closest cabinet
  • cabinet sid, address, distance from Nashville
  • links to each cabinet details page

Stop with Ctrl+C (SIGINT) or SIGTERM.