forked from rDrama/rDrama
1
0
Fork 0

fix group mentions overcharging ppl

master
Aevann 2023-10-28 18:19:25 +03:00
parent da1e87ebff
commit a9e02098e7
1 changed files with 2 additions and 3 deletions

View File

@ -212,14 +212,13 @@ def NOTIFY_USERS(text, v, oldtext=None, ghost=False, log_cost=None, followers_pi
if cost > v.coins + v.marseybux:
abort(403, f"You need {cost} currency to mention these ping groups!")
if log_cost:
log_cost.ping_cost += cost
if i.group(1) in {'biofoids','neofoids','jannies'}:
coin_receivers.update(member_ids)
if cost:
v.charge_account('combined', cost)
if log_cost:
log_cost.ping_cost += cost
if coin_receivers:
g.db.query(User).options(load_only(User.id)).filter(User.id.in_(coin_receivers)).update({ User.coins: User.coins + 10 })