Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command to create bet for fun #44

Open
5 tasks
daniloab opened this issue Jun 14, 2024 · 11 comments
Open
5 tasks

command to create bet for fun #44

daniloab opened this issue Jun 14, 2024 · 11 comments

Comments

@daniloab
Copy link
Contributor

daniloab commented Jun 14, 2024

What is the idea?

It must be able to create a BET pool, for example, !bet corinthians x sao paulo, then, users from the group could bet for fun on corinthians or sao paulo.

Then, once starting a new bet users could bet on it and create the odds based on this.

Since it is for fun, initially, it won't need payments.

Validations

  • It must be able to have one bet active per group to make easier control it
  • each user of the group could bet one time only
  • Only admins would be able to start bets
  • Only admins would be able to finish a bet
  • the command must follow the pattern !bet corinthians x sao paulo team1 x team2, if out of this pattern it must return an error

side commands

  • !bet-odds - would return the odds of an active bet, it must return an error if any bet active
  • !bet-odd team1 10 - it must create a new bet odd in the specific team, it must follow the pattern bet-odd <team≥ <amount>, it must check if already has a bet active to the user
  • !bet-end <team winner> it must end an active bet, show results. based on team winner, list of winners and loser, and remove Bet and BetOdd collections entries with removedAt field being filled with new Date()

Architecture

  • new model Bet
  • fields: team1, team1, active, groupId
  • new model BetOdd
  • fields: userId, groupdId, betId, amount

Example of usage

dan: !bet corinthians x sp
bot: new bet start corinthians x sp
blazu: !bet-odd team1 10
bot: bet corinthians 1.50 x 1.00 sp
akinn: !bet-odd team2 10
bot: bet corinthians 1.50 x 1.50 sp
dan: !bet-odds 
bot: <actual to the teams odds>
dan: !bet-end corinthians (of course)
bot: bet corinthians x sao paulo finished. Corinthians Winner. List of winner @vinibgoulart, list of losers @akinncar 
@dddantas
Copy link

vai corinthians

1 similar comment
@LukeberryPi
Copy link

vai corinthians

@vinibgoulart
Copy link
Owner

vai sao paulo

@joao-gugel
Copy link

VAI CORINTHIANS

1 similar comment
@arthurleal98
Copy link

VAI CORINTHIANS

@leomunizq
Copy link

⬛️🟥⬛️🟥

@Pedro-phd
Copy link

VAI CORINTHIANS 🦅🦅

@vitoUwu
Copy link

vitoUwu commented Jun 14, 2024

VAI CORINTHIANS!!!

@AlexReisC
Copy link

Avanti palestra😝

@lucasdwn
Copy link

VAI CURINTIA

@gxstavo19k
Copy link

VAI CORINTHIANS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests