🎟️ Lottery

A server lottery: members buy tickets during the round, and a draw picks a winner weighted by how many tickets they hold. The more tickets, the better the odds.

How it works

Funded by the casino vault

The casino vault holds the money players lose at the casino. You can pour a configurable share of it into the pot at each draw, so the house edge flows back to players without creating any new money. Set the share to 0% to fund the pot from ticket sales only.

Safe by design

Buying a ticket debits money atomically (no duplication), the draw uses a lock so it can never pay two winners for one round, and cancelling a round refunds every ticket.

Commands

/lottery infoPot, your tickets, next draw.
/lottery buyBuy tickets.
/lottery drawStaff: draw now.
/lottery cancelStaff: cancel and refund the round.