No description
  • TypeScript 100%
Find a file
mmattbtw f2a01a2f31
refactor to use nearby cabs route
- thx @maid.dating - at://did:plc:uy5artej7bikgrupgx6penlw/app.bsky.feed.post/3meui7fpljsii
2026-02-14 20:31:18 -06:00
.cursor/rules init 2026-02-14 19:54:34 -06:00
.gitignore init 2026-02-14 19:54:34 -06:00
bun.lock init 2026-02-14 19:54:34 -06:00
CLAUDE.md init 2026-02-14 19:54:34 -06:00
index.ts refactor to use nearby cabs route 2026-02-14 20:31:18 -06:00
package.json init 2026-02-14 19:54:34 -06:00
README.md default location 2026-02-14 19:57:22 -06:00
tsconfig.json init 2026-02-14 19:54:34 -06:00

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.