/tg/ Station 13 - Modules - TypesVar Details - Proc Details

active_bet

The active bet that our app will create & use, handles following who owns the bet, who is betting, and also takes care of paying out at the end.

Vars

bet_ownerThe person owning the bet, who will choose which option has won.
descriptionThe description of the bet
lockedBoolean on whether the bet is locked from getting new betters, or current ones from taking their money out.
nameThe name of the bet
newscaster_messageThe message we sent to the newscaster, which we'll then reply to once the betting is over.
options
total_amount_betTotal amount of money that has been bet.

Procs

bet_moneyPuts a bank account's money bet on a given option.
cancel_betCancels your bet, removing your bet and refunding your money.
get_betsReturns how many bets there is per option
payoutPays out the loser's money equally to all the winners, or refunds it all if no winning option was given.

Var Details

bet_owner

The person owning the bet, who will choose which option has won.

description

The description of the bet

locked

Boolean on whether the bet is locked from getting new betters, or current ones from taking their money out.

name

The name of the bet

newscaster_message

The message we sent to the newscaster, which we'll then reply to once the betting is over.

options

total_amount_bet

Total amount of money that has been bet.

Proc Details

bet_money

Puts a bank account's money bet on a given option.

cancel_bet

Cancels your bet, removing your bet and refunding your money.

get_bets

Returns how many bets there is per option

payout

Pays out the loser's money equally to all the winners, or refunds it all if no winning option was given.