forked from rDrama/rDrama
reduce ping cost from 10/user to 5/user
parent
e1d6c97465
commit
f318153d27
|
@ -129,7 +129,7 @@ def execute_snappy(post, v):
|
||||||
elif body == '!pinggroup':
|
elif body == '!pinggroup':
|
||||||
group = g.db.query(Group).order_by(func.random()).first()
|
group = g.db.query(Group).order_by(func.random()).first()
|
||||||
|
|
||||||
cost = len(group.member_ids) * 10
|
cost = len(group.member_ids) * 5
|
||||||
snappy.charge_account('coins', cost)
|
snappy.charge_account('coins', cost)
|
||||||
|
|
||||||
body = f'!{group.name}'
|
body = f'!{group.name}'
|
||||||
|
|
|
@ -161,7 +161,7 @@ def NOTIFY_USERS(text, v, oldtext=None, ghost=False, log_cost=None, followers_pi
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if i.group(1) == 'everyone' and not v.shadowbanned:
|
if i.group(1) == 'everyone' and not v.shadowbanned:
|
||||||
cost = g.db.query(User).count() * 10
|
cost = g.db.query(User).count() * 5
|
||||||
if cost > v.coins:
|
if cost > v.coins:
|
||||||
abort(403, f"You need {cost} coins to mention these ping groups!")
|
abort(403, f"You need {cost} coins to mention these ping groups!")
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ def NOTIFY_USERS(text, v, oldtext=None, ghost=False, log_cost=None, followers_pi
|
||||||
if (ghost or v.id not in member_ids) and i.group(1) != 'followers':
|
if (ghost or v.id not in member_ids) and i.group(1) != 'followers':
|
||||||
if group and group.name == 'verifiedrich':
|
if group and group.name == 'verifiedrich':
|
||||||
abort(403, f"Only !verifiedrich members can mention it!")
|
abort(403, f"Only !verifiedrich members can mention it!")
|
||||||
cost += len(members) * 10
|
cost += len(members) * 5
|
||||||
if cost > v.coins:
|
if cost > v.coins:
|
||||||
abort(403, f"You need {cost} coins to mention these ping groups!")
|
abort(403, f"You need {cost} coins to mention these ping groups!")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue