Skip to content

Yusin0903/dslr-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📷 DSLR Monitor Bot

Monitor PTT DC_SALE and DCView 二手市場 for camera gear matching your keywords, with instant Discord alerts.

✨ Features

  • 🔍 Keyword Monitoring — Add partial keywords (e.g. 70-200, A7R5, GR3x) and get alerted when matching listings appear
  • 📡 Dual Source — Monitors both PTT DC_SALE and DCView Market
  • Auto Scan — Checks every 90 seconds for new listings
  • 🎯 Discord Slash Commands — Easy setup via /add, /remove, /list, /monitor, /scan
  • 🐳 Docker + Zeabur Ready — One-click deploy

🚀 Discord Commands

Command Description
/add <keyword> 新增監控關鍵字 (e.g. 70-200)
/remove <keyword> 移除監控關鍵字
/list 顯示所有監控關鍵字與狀態
/monitor 設定當前頻道為通知頻道
/stop 停止通知
/scan 立即手動掃描一次

🔧 Setup

1. Create Discord Bot

  1. Go to Discord Developer Portal
  2. Create a new application → Bot
  3. Enable Message Content Intent (Settings → Bot)
  4. Copy the Bot Token

2. Local Development

cd dslr_monitor
cp .env.example .env
# Edit .env and paste your DISCORD_TOKEN

# Install dependencies
uv sync

# Run
uv run python bot.py

3. Deploy on Zeabur

  1. Push this folder to a Git repository
  2. Go to Zeabur → Create Project → Import from Git
  3. Add environment variable: DISCORD_TOKEN = your bot token
  4. Deploy! Zeabur will auto-detect the Dockerfile

📁 Project Structure

dslr_monitor/
├── bot.py          # Discord bot (slash commands + monitor loop)
├── scrapers.py     # Web scrapers for PTT & DCView
├── storage.py      # JSON-based persistent storage
├── Dockerfile      # Docker image for Zeabur deployment
├── pyproject.toml  # Dependencies (uv)
└── .env.example    # Environment variable template

💡 How It Works

  1. User adds keywords via /add 70-200 — this tells the bot to watch for titles containing "70-200"
  2. User sets alert channel via /monitor in the desired Discord channel
  3. Bot auto-scrapes both PTT DC_SALE and DCView Market every 90 seconds
  4. New listings matching keywords trigger a rich embed alert in the Discord channel
  5. Deduplication ensures you only get notified once per listing

About

use discord chat bot to monitor target DSLR SLR related commodity.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors