dont tie autojanny with bets
parent
6b63514d8e
commit
11beaf5c5f
|
@ -158,9 +158,6 @@ def remove_admin(v, username):
|
|||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||
@admin_level_required(PERMS['POST_BETS_DISTRIBUTE'])
|
||||
def distribute(v, kind, option_id):
|
||||
autojanny = get_account(AUTOJANNY_ID)
|
||||
if autojanny.coins == 0: abort(400, "@AutoJanny has 0 coins")
|
||||
|
||||
if kind == 'post': cls = PostOption
|
||||
else: cls = CommentOption
|
||||
|
||||
|
@ -178,10 +175,6 @@ def distribute(v, kind, option_id):
|
|||
if o.exclusive >= 2: pool += o.upvotes
|
||||
pool *= POLL_BET_COINS
|
||||
|
||||
autojanny.charge_account('coins', pool)
|
||||
if autojanny.coins < 0: autojanny.coins = 0
|
||||
g.db.add(autojanny)
|
||||
|
||||
votes = option.votes
|
||||
|
||||
if not votes:
|
||||
|
|
|
@ -29,9 +29,6 @@ def vote_option(option_id, v):
|
|||
if not v.charge_account('combined', POLL_BET_COINS)[0]:
|
||||
abort(400, f"You don't have {POLL_BET_COINS} coins or marseybux!")
|
||||
g.db.add(v)
|
||||
autojanny = get_account(AUTOJANNY_ID)
|
||||
autojanny.pay_account('coins', POLL_BET_COINS)
|
||||
g.db.add(autojanny)
|
||||
|
||||
if option.exclusive:
|
||||
vote = g.db.query(PostOptionVote).join(PostOption).filter(
|
||||
|
@ -85,9 +82,6 @@ def vote_option_comment(option_id, v):
|
|||
if not v.charge_account('combined', POLL_BET_COINS)[0]:
|
||||
abort(400, f"You don't have {POLL_BET_COINS} coins or marseybux!")
|
||||
g.db.add(v)
|
||||
autojanny = get_account(AUTOJANNY_ID)
|
||||
autojanny.pay_account('coins', POLL_BET_COINS)
|
||||
g.db.add(autojanny)
|
||||
|
||||
if option.exclusive:
|
||||
vote = g.db.query(CommentOptionVote).join(CommentOption).filter(
|
||||
|
|
Loading…
Reference in New Issue