reduce ping cost from 10/user to 5/user

pull/195/head
Aevann 2023-08-20 19:36:13 +03:00
parent e1d6c97465
commit f318153d27
2 changed files with 3 additions and 3 deletions

View File

@ -129,7 +129,7 @@ def execute_snappy(post, v):
elif body == '!pinggroup':
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)
body = f'!{group.name}'

View File

@ -161,7 +161,7 @@ def NOTIFY_USERS(text, v, oldtext=None, ghost=False, log_cost=None, followers_pi
continue
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:
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 group and group.name == 'verifiedrich':
abort(403, f"Only !verifiedrich members can mention it!")
cost += len(members) * 10
cost += len(members) * 5
if cost > v.coins:
abort(403, f"You need {cost} coins to mention these ping groups!")