forked from rDrama/rDrama
fix snappy ping cost
parent
7fef1ffab5
commit
883b553c7a
|
@ -58,6 +58,8 @@ def execute_snappy(post:Post, v:User):
|
||||||
|
|
||||||
snappy = get_account(SNAPPY_ID)
|
snappy = get_account(SNAPPY_ID)
|
||||||
|
|
||||||
|
ping_cost = None
|
||||||
|
|
||||||
if v.id == CARP_ID:
|
if v.id == CARP_ID:
|
||||||
if random.random() < 0.02:
|
if random.random() < 0.02:
|
||||||
body = "i love you carp"
|
body = "i love you carp"
|
||||||
|
@ -128,6 +130,8 @@ def execute_snappy(post:Post, v:User):
|
||||||
snappy.charge_account('coins', cost)
|
snappy.charge_account('coins', cost)
|
||||||
|
|
||||||
body = f'!{group.name}'
|
body = f'!{group.name}'
|
||||||
|
|
||||||
|
ping_cost = cost
|
||||||
elif body.startswith(':#marseyglow'):
|
elif body.startswith(':#marseyglow'):
|
||||||
award_object = AwardRelationship(
|
award_object = AwardRelationship(
|
||||||
user_id=snappy.id,
|
user_id=snappy.id,
|
||||||
|
@ -200,6 +204,9 @@ def execute_snappy(post:Post, v:User):
|
||||||
ghost=ghost
|
ghost=ghost
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if ping_cost:
|
||||||
|
c.ping_cost = ping_cost
|
||||||
|
|
||||||
g.db.add(c)
|
g.db.add(c)
|
||||||
|
|
||||||
check_slots_command(c, v, snappy)
|
check_slots_command(c, v, snappy)
|
||||||
|
|
Loading…
Reference in New Issue