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
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
!bet corinthians x sao paulo
team1 x team2, if out of this pattern it must return an errorside 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 patternbet-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 removeBet
andBetOdd
collections entries with removedAt field being filled with new Date()Architecture
Bet
Example of usage