diff --git a/files/helpers/actions.py b/files/helpers/actions.py
index 94e0b98e7..486e6b601 100644
--- a/files/helpers/actions.py
+++ b/files/helpers/actions.py
@@ -166,7 +166,7 @@ def execute_snappy(post, v):
g.db.add(award_object)
awarded_coins = int(AWARDS["glowie"]['price'] * COSMETIC_AWARD_COIN_AWARD_PCT)
- post.author.pay_account('coins', awarded_coins, f"glowie award on {post.textlink}")
+ post.author.pay_account('coins', awarded_coins, f"Glowie award on {post.textlink}")
msg = f"@Snappy has given {post.textlink} the Glowie Award and you have received {awarded_coins} coins as a result!"
send_repeatable_notification(post.author.id, msg)
diff --git a/files/helpers/alerts.py b/files/helpers/alerts.py
index c32ec1440..283fc55ef 100644
--- a/files/helpers/alerts.py
+++ b/files/helpers/alerts.py
@@ -196,7 +196,7 @@ def NOTIFY_USERS(text, v, oldtext=None, ghost=False, obj=None, followers_ping=Tr
if cost > v.coins + v.marseybux:
abort(403, f"You need {cost} currency to mention these ping groups!")
- reason = f"group pinging cost (!everyone
)"
+ reason = f"Group pinging cost (!everyone
)"
if obj:
reason += f" on {obj.textlink}"
v.charge_account('coins/marseybux', cost, reason)
@@ -244,7 +244,7 @@ def NOTIFY_USERS(text, v, oldtext=None, ghost=False, obj=None, followers_ping=Tr
if charge:
if cost:
- reason = f"group pinging cost (!" + "
, !".join(cost_groups) + "
)"
+ reason = f"Group pinging cost (!" + "
, !".join(cost_groups) + "
)"
if obj:
reason += f" on {obj.textlink}"
v.charge_account('coins/marseybux', cost, reason)
diff --git a/files/helpers/cron.py b/files/helpers/cron.py
index 5d03c61d1..7c4d91a7e 100644
--- a/files/helpers/cron.py
+++ b/files/helpers/cron.py
@@ -353,7 +353,7 @@ def _unpin_expired():
def _give_marseybux_salary():
for u in g.db.query(User).filter(User.admin_level > 0).all():
marseybux_salary = u.admin_level * 10000
- u.pay_account('marseybux', marseybux_salary, "janny salary")
+ u.pay_account('marseybux', marseybux_salary, "Janny salary")
send_repeatable_notification(u.id, f"You have received your monthly janny salary of {marseybux_salary} Marseybux!")
def _expire_blocks_mutes_exiles():
diff --git a/files/helpers/lottery.py b/files/helpers/lottery.py
index f8eb3fab3..f45bcb388 100644
--- a/files/helpers/lottery.py
+++ b/files/helpers/lottery.py
@@ -47,7 +47,7 @@ def end_lottery_session():
winner = random.choice(raffle)
active_lottery.winner_id = winner
winning_user = next(filter(lambda x: x.id == winner, participating_users))
- winning_user.pay_account('coins', active_lottery.prize, "lottery winnings")
+ winning_user.pay_account('coins', active_lottery.prize, "Lottery winnings")
winning_user.total_lottery_winnings += active_lottery.prize
badge_grant(user=winning_user, badge_id=LOTTERY_WINNER_BADGE_ID)
@@ -109,7 +109,7 @@ def purchase_lottery_tickets(v, quantity=1):
if (most_recent_lottery is None):
return False, "There is no active lottery!"
- if not v.charge_account('coins', LOTTERY_TICKET_COST * quantity, f'cost of {quantity} lottery tickets')[0]:
+ if not v.charge_account('coins', LOTTERY_TICKET_COST * quantity, f'Cost of {quantity} lottery tickets')[0]:
return False, "You don't have enough coins"
v.currently_held_lottery_tickets += quantity
diff --git a/files/helpers/roulette.py b/files/helpers/roulette.py
index 496f7d7fc..bd601d746 100644
--- a/files/helpers/roulette.py
+++ b/files/helpers/roulette.py
@@ -85,7 +85,7 @@ def get_active_roulette_games():
def charge_gambler(gambler, amount, currency):
- charged = gambler.charge_account(currency, amount, "cost of roulette bet")[0]
+ charged = gambler.charge_account(currency, amount, "Cost of roulette bet")[0]
if not charged:
raise Exception("Gambler cannot afford charge.")
@@ -179,8 +179,8 @@ def spin_roulette_wheel():
coin_winnings = gambler_payout['coins']
procoin_winnings = gambler_payout['marseybux']
- gambler.pay_account('coins', coin_winnings, "roulette winnings")
- gambler.pay_account('marseybux', procoin_winnings, "roulette winnings")
+ gambler.pay_account('coins', coin_winnings, "Roulette winnings")
+ gambler.pay_account('marseybux', procoin_winnings, "Roulette winnings")
# Notify the winners.
notification_text = f"Winning number: {number}\n\nCongratulations! One or more of your roulette bets paid off!\n\n"
diff --git a/files/helpers/slots.py b/files/helpers/slots.py
index 6efbc6611..c5e60385c 100644
--- a/files/helpers/slots.py
+++ b/files/helpers/slots.py
@@ -57,7 +57,7 @@ def casino_slot_pull(gambler, wager_value, currency):
user_id=gambler.id,
currency=currency,
amount=-casino_game.winnings,
- reason="slots bet",
+ reason="Slots bet",
)
g.db.add(currency_log)
if currency == 'coins':
diff --git a/files/helpers/treasure.py b/files/helpers/treasure.py
index 889f1cc8d..5fb02963a 100644
--- a/files/helpers/treasure.py
+++ b/files/helpers/treasure.py
@@ -40,5 +40,5 @@ def check_for_treasure(from_comment, in_text):
from_comment.treasure_amount = f'l{ticket_count}'
return
- user.pay_account('coins', amount, f"found treasure in {from_comment.textlink}")
+ user.pay_account('coins', amount, f"Found treasure in {from_comment.textlink}")
from_comment.treasure_amount = str(amount)
diff --git a/files/helpers/twentyone.py b/files/helpers/twentyone.py
index b0c3442b9..9f41ce307 100644
--- a/files/helpers/twentyone.py
+++ b/files/helpers/twentyone.py
@@ -325,7 +325,7 @@ def handle_payout(gambler, state, game):
user_id=gambler.id,
currency=game.currency,
amount=-game.winnings,
- reason="blackjack bet",
+ reason="Blackjack bet",
)
g.db.add(currency_log)
if currency == 'coins':
diff --git a/files/routes/admin.py b/files/routes/admin.py
index 08b1f952e..36a851842 100644
--- a/files/routes/admin.py
+++ b/files/routes/admin.py
@@ -188,7 +188,7 @@ def distribute(v, kind, option_id):
cid = notif_comment(text)
for vote in votes:
u = vote.user
- u.pay_account('coins', coinsperperson, f"bet winnings on {parent.textlink}")
+ u.pay_account('coins', coinsperperson, f"Bet winnings on {parent.textlink}")
add_notif(cid, u.id, text, pushnotif_url=parent.permalink)
text = f"You lost the {POLL_BET_COINS} coins you bet on {parent.textlink} :marseylaugh:"
@@ -2163,7 +2163,7 @@ def mark_effortpost(pid, v):
coins = (p.upvotes + p.downvotes) * mul
- p.author.pay_account('coins', coins, f"retroactive efortpost gains of {post.textlink}")
+ p.author.pay_account('coins', coins, f"Retroactive efortpost gains of {post.textlink}")
if v.id != p.author_id:
send_repeatable_notification(p.author_id, f":marseyclapping: @{v.username} (a site admin) has marked {p.textlink} as an effortpost, it now gets x{mul} coins from votes. You have received {coins} coins retroactively, thanks! :!marseyclapping:")
@@ -2200,7 +2200,7 @@ def unmark_effortpost(pid, v):
coins = (p.upvotes + p.downvotes) * mul
- p.author.charge_account('coins', coins, f"revocation of efortpost gains of {post.textlink}")
+ p.author.charge_account('coins', coins, f"Revocation of efortpost gains of {post.textlink}")
if v.id != p.author_id:
send_repeatable_notification(p.author_id, f":marseyitsover: @{v.username} (a site admin) has unmarked {p.textlink} as an effortpost. {coins} coins have been deducted from you. :!marseyitsover:")
diff --git a/files/routes/asset_submissions.py b/files/routes/asset_submissions.py
index ef25530ab..f74bf3bb4 100644
--- a/files/routes/asset_submissions.py
+++ b/files/routes/asset_submissions.py
@@ -225,7 +225,7 @@ def approve_emoji(v, name):
if 'pkmn' in emoji.tags: amount = 500
else: amount = 250
- author.pay_account('coins', amount, f"reward for making :{emoji.name}:")
+ author.pay_account('coins', amount, f"Reward for making :{emoji.name}:
")
g.db.add(author)
if v.id != author.id:
diff --git a/files/routes/awards.py b/files/routes/awards.py
index e053c7662..da0eef846 100644
--- a/files/routes/awards.py
+++ b/files/routes/awards.py
@@ -64,7 +64,7 @@ def buy_award(v, kind, AWARDS):
else:
currency = 'coins/marseybux'
- charged = v.charge_account(currency, price, f"{kind} award cost")
+ charged = v.charge_account(currency, price, f"{AWARDS[kind]['title']} award cost")
if not charged[0]:
abort(400, f"Not enough {currency}!")
@@ -238,8 +238,8 @@ def award_thing(v, thing_type, id):
if kind == 'shit':
awarded_coins = int(AWARDS[kind]['price'] * COSMETIC_AWARD_COIN_AWARD_PCT)
- v.charge_account('coins', awarded_coins, f"shit award deflected theft on {obj.textlink}", should_check_balance=False)
- obj.author.pay_account('coins', awarded_coins, f"shit award deflected theft on {obj.textlink}")
+ v.charge_account('coins', awarded_coins, f"Deflected shit award on {obj.textlink}", should_check_balance=False)
+ obj.author.pay_account('coins', awarded_coins, f"Deflected shit award on {obj.textlink}")
elif kind != 'spider':
if AWARDS[kind]['cosmetic'] and not AWARDS[kind]['included_in_lootbox']:
awarded_coins = int(AWARDS[kind]['price'] * COSMETIC_AWARD_COIN_AWARD_PCT)
@@ -248,10 +248,10 @@ def award_thing(v, thing_type, id):
if awarded_coins:
if kind == 'shit':
- author.charge_account('coins', awarded_coins, f"shit award theft on {obj.textlink}", should_check_balance=False)
- v.pay_account('coins', awarded_coins, f"shit award theft on {obj.textlink}")
+ author.charge_account('coins', awarded_coins, f"Shit award on {obj.textlink}", should_check_balance=False)
+ v.pay_account('coins', awarded_coins, f"Shit award on {obj.textlink}")
else:
- author.pay_account('coins', awarded_coins)
+ author.pay_account('coins', awarded_coins, f"{award_title} award on {obj.textlink}")
if kind == 'marsify' and author.marsify == 1:
abort(409, f"{safe_username} already permanently marsified!")
@@ -479,7 +479,7 @@ def award_thing(v, thing_type, id):
author.patron = 1
if author.patron_utc: author.patron_utc += 2629746
else: author.patron_utc = int(time.time()) + 2629746
- author.pay_account('marseybux', 1250, f"benefactor award on {obj.textlink}")
+ author.pay_account('marseybux', 1250, f"Benefactor award on {obj.textlink}")
badge_grant(user=v, badge_id=103)
elif kind == "rehab":
if author.rehab: author.rehab += 86400
diff --git a/files/routes/groups.py b/files/routes/groups.py
index baad74709..d0007004a 100644
--- a/files/routes/groups.py
+++ b/files/routes/groups.py
@@ -35,7 +35,7 @@ def create_group(v):
if name in {'everyone', 'jannies', 'holejannies', 'followers', 'commenters'} or g.db.get(Group, name):
abort(400, "This group already exists!")
- if not v.charge_account('coins/marseybux', GROUP_COST, f"cost of creating !{name}")[0]:
+ if not v.charge_account('coins/marseybux', GROUP_COST, f"Cost of creating !{name}")[0]:
abort(403, "You don't have enough coins or marseybux!")
g.db.add(v)
diff --git a/files/routes/hats.py b/files/routes/hats.py
index 3c0f65804..faf486a11 100644
--- a/files/routes/hats.py
+++ b/files/routes/hats.py
@@ -44,12 +44,12 @@ def buy_hat(v, hat_id):
if not hat.is_purchasable:
abort(403, "This hat is not for sale!")
- charged = v.charge_account('coins/marseybux', hat.price, f"{hat.name} hat cost")
+ charged = v.charge_account('coins/marseybux', hat.price, f"{hat.name}
hat cost")
if not charged[0]:
abort(400, "Not enough coins/marseybux!")
v.coins_spent_on_hats += charged[1]
- hat.author.pay_account('coins', hat.price * 0.1, f"royalties for `{hat.name}`")
+ hat.author.pay_account('coins', hat.price * 0.1, f"Royalties for {hat.name}
hat")
new_hat = Hat(user_id=v.id, hat_id=hat.id)
g.db.add(new_hat)
diff --git a/files/routes/holes.py b/files/routes/holes.py
index 47ee405d4..cac35130e 100644
--- a/files/routes/holes.py
+++ b/files/routes/holes.py
@@ -393,7 +393,7 @@ def create_sub2(v):
if not hole_group_name_regex.fullmatch(name):
abort(400, "Name does not match the required format!")
- if not v.charge_account('coins/marseybux', HOLE_COST, f"cost of creating /h/{name}")[0]:
+ if not v.charge_account('coins/marseybux', HOLE_COST, f"Cost of creating /h/{name}")[0]:
abort(400, "You don't have enough coins or marseybux!")
hole = get_hole(name, graceful=True)
diff --git a/files/routes/polls.py b/files/routes/polls.py
index 41b16ae7c..0d293b720 100644
--- a/files/routes/polls.py
+++ b/files/routes/polls.py
@@ -26,7 +26,7 @@ def vote_option(option_id, v):
if option.exclusive == 2:
if option.parent.total_bet_voted(v):
abort(403, "You can't participate in a closed bet!")
- if not v.charge_account('coins/marseybux', POLL_BET_COINS, f"cost of bet on {option.parent.textlink}")[0]:
+ if not v.charge_account('coins/marseybux', POLL_BET_COINS, f"Cost of bet on {option.parent.textlink}")[0]:
abort(400, f"You don't have {POLL_BET_COINS} coins or marseybux!")
g.db.add(v)
@@ -79,7 +79,7 @@ def vote_option_comment(option_id, v):
if option.exclusive == 2:
if option.parent.total_bet_voted(v):
abort(403, "You can't participate in a closed bet!")
- if not v.charge_account('coins/marseybux', POLL_BET_COINS, f"cost of bet on {option.parent.textlink}")[0]:
+ if not v.charge_account('coins/marseybux', POLL_BET_COINS, f"Cost of bet on {option.parent.textlink}")[0]:
abort(400, f"You don't have {POLL_BET_COINS} coins or marseybux!")
g.db.add(v)
diff --git a/files/routes/settings.py b/files/routes/settings.py
index 28e0a7a8f..686c81927 100644
--- a/files/routes/settings.py
+++ b/files/routes/settings.py
@@ -381,7 +381,7 @@ def settings_personal_post(v):
else:
cost = HOUSE_JOIN_COST
- success = v.charge_account('coins/marseybux', cost, "cost of changing houses")[0]
+ success = v.charge_account('coins/marseybux', cost, "Cost of changing houses")[0]
if not success: abort(403)
if house == "None":
diff --git a/files/routes/users.py b/files/routes/users.py
index 20fc1fbdb..97c1b4cbe 100644
--- a/files/routes/users.py
+++ b/files/routes/users.py
@@ -78,7 +78,7 @@ def claim_rewards_all_users():
marseybux = int(marseybux)
text = f"You have received {marseybux} Marseybux! You can use them to buy awards or hats in the [shop](/shop/awards) or gamble them in the [casino](/casino)."
- user.pay_account('marseybux', marseybux, f"{patron.lower()} reward")
+ user.pay_account('marseybux', marseybux, f"{patron} reward")
send_repeatable_notification(user.id, text)
g.db.add(user)
@@ -147,13 +147,13 @@ def transfer_currency(v, username, currency_name, apply_tax):
notif_text += f"\n\n> {reason}"
log_message += f"\n\n> {reason}"
- if not v.charge_account(currency_name, amount, f"gift to @{username}")[0]:
+ if not v.charge_account(currency_name, amount, f"Gift to @{username}")[0]:
abort(400, f"You don't have enough {currency_name}")
if currency_name == 'marseybux':
- receiver.pay_account('marseybux', amount - tax, f"gift from @{v.username}")
+ receiver.pay_account('marseybux', amount - tax, f"Gift from @{v.username}")
elif currency_name == 'coins':
- receiver.pay_account('coins', amount - tax, f"gift from @{v.username}")
+ receiver.pay_account('coins', amount - tax, f"Gift from @{v.username}")
else:
raise ValueError(f"Invalid currency '{currency_name}' got when transferring {amount} from {v.id} to {receiver.id}")