A Discord bot that enables server members to create and participate in prediction markets using a points-based system. Users can create predictions, place bets on different outcomes, and win points based on correct predictions.
- Create prediction markets with multiple options
- Place bets on active predictions
- Automatic market closure and resolution system
- Category-based organization
- Odds calculation and display
- Automatic refund system for unresolved predictions
- User notifications for bet outcomes
- The everyday Mezo Community that wants exposure to Prediction Markets without having to use their crypto or fiat
- The degens who want to bet on anything and everything
- People who want to simply place fun bets with friends over random things
- A highly engaging bot that allows users to speculate/ play without fear of losing a big bag
- Gives the community power to essentially create fun mini-games in a sense
- Brings about commraderie by allowing users to make bets on some of their favorite community members
- We would like for the UI/UX to be cleaner and better looking
- Hit a 100k different transactions on our bot
- Hit 100 different and unique Prediction Market categories
- Help with streamlining the bot and creating a better UI/UX
- Integrating emojis and gifs for certain results from Markets to provide more fun
- Patrick Anderson, Peteya2, Buildooor
- Vazzy, Supreme Testooor
- Ryan Fox, Dev Rel, GitHub Guru
- Sonny Monroe, Code Specialist
Creates a new prediction market.
- Parameters:
question
: The main question or topic of the predictionduration
: How long the prediction will remain open (in minutes)options
: Comma-separated list of possible outcomescategory
(optional): Category to organize predictions
Example:
/create_prediction question:"Will it rain tomorrow?" duration:1440 options:"Yes,No" category:"Weather"
Place a bet on an active prediction.
- Select a category
- Choose a prediction
- Select an option to bet on
- Enter the amount to bet
The bot will show current odds and your potential payout before confirming the bet.
Displays all predictions, organized into categories:
- 🟢 Active Markets: Currently open for betting
- 🟡 Pending Resolution: Betting closed, awaiting resolution
- ⭐ Resolved Markets: Completed predictions with results
- 💰 Refunded Markets: Predictions that were refunded
Each prediction shows:
- Question
- Category
- Total betting pool
- Current odds
- Time remaining/ended
- Winner (for resolved predictions)
Resolve a prediction by selecting the winning outcome.
- Only available to the prediction creator
- Must be used within 48 hours of prediction end time
- Automatically distributes winnings to successful bettors
- Markets automatically close after the specified duration
- Creator is notified when betting period ends
- Creator has 48 hours to resolve the prediction
- If a prediction isn't resolved within 48 hours of closing:
- All bets are automatically refunded
- Users are notified of the refund
- Market is marked as refunded
Users receive direct messages for:
- Winning bets (showing profit and total payout)
- Losing bets (showing amount lost)
- Refunded bets
- Market resolution requirements (for creators)
- Users must have sufficient points to place bets
- Winning payouts are calculated based on odds
- Points are automatically transferred when:
- Placing bets
- Receiving winnings
- Getting refunds
- Use clear, unambiguous questions
- Provide distinct, mutually exclusive options
- Set appropriate durations for the type of prediction
- Use categories to organize related predictions
- Check current odds before betting
- Consider the total pool size
- Monitor remaining time before market closure
- Review your betting history to improve strategy
- Resolve predictions promptly after the outcome is known
- Ensure fair and accurate resolution based on verifiable results
- Consider setting up clear resolution criteria when creating predictions
- All times are displayed in UTC
- Odds are updated in real-time as bets are placed
- Bot requires administrator permissions to manage predictions
- Python 3.8 or higher
- Discord bot token
- DRIP API credentials
Create a .env
file with:
TOKEN=your_discord_bot_token
API_BASE_URL=https://api.drip.re
API_KEY=your_drip_api_key
REALM_ID=your_drip_realm_id
Discord token is the token of the bot, you can get one by creating an app and then generating a token. GUIDE
DRIP API key and realm ID can be found in your DRIP Admin channel in the server you want to use.
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
- Configure environment variables
- Run the bot:
python bot.py