metadata
title: ROI Bet Tracking Bot
emoji: 📈
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
short_description: Discord bet tracker with per-user ROI stats.
ROI Bet Tracking Discord Bot
A Discord bot for manually tracking bets and ROI per user. Each Discord user gets their own independent bet history, sport-tagged analytics, exports, and summary charts.
Features
/betlogs one bet privately using sportsbook and sport dropdowns/bulkaddlogs multiple bets privately for one sportsbook and one sport/editbetupdates an open bet privately/deletebetsoft deletes a bet privately without wiping audit history/resolvegrades a bet aswin,loss, orvoid/resolveallgrades multiple bet IDs to the same result/bankrollmanages starting bankroll and unit settings/roiposts a public trend-first ROI view with filters and chart/betsposts a public filtered ledger with pagination/summaryposts a public record-first summary with chart/booksshows ROI and win rate by sportsbook/sportsshows ROI and win rate by sport/exportexports a filtered CSV of a user’s bets privately/commandsposts a public command reference embed/welcomeposts a public welcome embed and tags everyone for admins only- CockroachDB / Postgres-compatible persistence via
DATABASE_URL - Docker-ready for Hugging Face Spaces
Setup
- Install dependencies:
npm.cmd install
- Copy
.env.exampleto.envand add your bot config:
DISCORD_TOKEN=your_token_here
GUILD_ID=optional_guild_id
DATABASE_URL=postgresql://username:password@host:26257/database?sslmode=require
ADMIN_ROLE_NAME=Admin
- Start the bot:
npm.cmd start
Notes
- Node.js 24+ is required.
- The bot stores data in your remote CockroachDB database.
/welcomeis restricted to members with the Discord role name set inADMIN_ROLE_NAME.- If
GUILD_IDis set, slash commands register to that guild for faster updates. Otherwise they register globally. - Set
DATABASE_URL,DISCORD_TOKEN, andADMIN_ROLE_NAMEas Hugging Face Space secrets. - The Docker Space exposes a tiny health endpoint on port
7860while the Discord bot runs in the same container.
Hugging Face Deployment
- Create a new Hugging Face Space using the
DockerSDK. - Push this repository to that Space.
- Add these Space secrets:
DISCORD_TOKENDATABASE_URLADMIN_ROLE_NAMEGUILD_ID(optional)
- Let the Space build and start.
The app will create and backfill its tables automatically on startup if they do not exist yet.
Bet Input Tips
The /bet command requires sportsbook and sport dropdowns first, then the modal asks for:
prop: Luka Doncic over 29.5 points
odds: -115
stake: $25
The /bulkadd modal accepts one bet per line in this format:
Bryan Rocchio 1+ HR | +1450 | $5
3 leg parlay | +1452 | $5
Oracle Cloud Always Free Deployment
This bot is a good fit for an Oracle Cloud Always Free Ubuntu VM because it:
- runs on Node.js
24+ - uses your remote CockroachDB/Postgres-compatible database
- does not require local persistent bet storage
Recommended deployment shape:
- Oracle Compute VM with Ubuntu LTS
- native Node runtime
systemdfor auto-restart and boot persistence- SSH exposed publicly on port
22only
Deployment assets included in this repo:
docs/oracle-always-free.mddeploy/oracle/roibot.servicedeploy/oracle/roibot.env.example
Market Scanner
Market scanning is admin-controlled and built into the same long-running bot process.
/scanstatusshows scanner health and last-run information/scanrunruns the Circa disagreement scanner manually/scanreportposts the morning discrepancy and width reports on demand/circatestpreviews Circa OCR parsing
Environment variables for scanner features:
ODDS_API_KEYODDS_API_BASE_URLODDS_API_SPORT_KEYODDS_API_REGIONSODDS_API_MARKETSCIRCA_DROPBOX_URL(public shared folder link)SCAN_REPORT_CHANNEL_IDSCAN_ALERT_CHANNEL_IDSCAN_MORNING_TIMESCAN_TIMEZONESCAN_MIN_BOOKSSCAN_DISAGREEMENT_THRESHOLDSCAN_ALERT_COOLDOWN_MINUTESSCAN_FREQUENCY_MINUTES