BetterBettingBot was built in order to help large teams be able to set bets in channels and workspaces over Slack. This is important given that it can often be so difficult with a large group of people, so we wanted to create something that could help streamline this process.
What it does
BetterBettingBot allows users to set up bets over Slack. Using our BetterBettingBot App, users can make the following calls: /create_bet, /clear_bet, /answer, and /poll. A user can call /create_bet in order to start a bet, where they can specify a topic, price and options for the poll. Then, once everyone has voted on that poll, a user can call /answer in order to access the active bets that they are the owners of and add the correct answer. By using /poll, a user can get a list of active bets, and then for each active bet, access the options and which users voted for each option. For each bet, once the correct option of the bet is identified, each of the losers and winners are informed through a private message about how much money and from who they will be receiving or sending money to.
How we built it
We built BetterBettingBot using Stdlib (Standard Library) and the Slack API with Node.js. We created slack slash commands for each of our functions. Using Stdlib's storage, we were able to store an array of bets that contained information about the people who voted for each option in each bets, the user who created the bet, the channel it was created on, whether the bet is active or not, and the price of the bet.
Challenges we ran into
First, we tried to incorporate the Interac API by letting people send money with their bets. However, we were unable to do so because it would be impossible for a bot to make requests on behalf of a user. Other difficulties included trying to create a dialogue with our bot, and some of our commands timing out.
What's next for BetterBettingBot
The next thing for BetterBettingBot is trying to integrate payments with our bets. In addition, we could look to find a better way to add the correct result of the bet, instead of having a person manually enter it in.