Skip to content

Repository files navigation

LuckyPot

A lottery bot for StackCoin. Players enter a pot by paying STK, and a daily draw selects a winner who takes the entire pot. There's also a small chance of an instant win on entry.

Setup

# Install dependencies
uv sync
# Copy and fill in environment variables
cp .env.dist .env
# Run the bot
python lucky_pot.py

Environment Variables

All environment variables are prefixed with LUCKYPOT_.

VariableRequiredDefaultDescription
LUCKYPOT_DISCORD_TOKENYesDiscord bot token
LUCKYPOT_STACKCOIN_API_URLYeshttp://localhost:4000StackCoin API base URL
LUCKYPOT_STACKCOIN_API_TOKENYesBot API token from StackCoin
LUCKYPOT_STACKCOIN_WS_URLNows://localhost:4000/wsStackCoin WebSocket URL
LUCKYPOT_DB_PATHNoluckypot.dbSQLite database path
LUCKYPOT_TESTING_GUILD_IDNoRestrict slash commands to one guild
LUCKYPOT_DEBUG_MODENofalseEnable /force-end-pot command
LUCKYPOT_DAILY_DRAW_HOURNo0Daily draw hour (UTC)
LUCKYPOT_DAILY_DRAW_MINUTENo0Daily draw minute (UTC)
LUCKYPOT_DRAW_INTERVAL_MINUTESNo0When >0, overrides daily schedule with a repeating interval (for testing)

Slash Commands

  • /enter-pot — Enter the daily lucky pot (costs 5 STK)
  • /pot-status — Check the current pot status and participants
  • /pot-history — View recent pot winners
  • /force-end-pot — [DEBUG] Force end the current pot with a draw

About

Daily StackCoin lottery Discord bot

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages