vc
This commit is contained in:
parent
6e853ff310
commit
935c592613
2 changed files with 5 additions and 5 deletions
|
@ -21,7 +21,7 @@ def send_repeatable_notification(uid, text, autojanny=False):
|
||||||
if autojanny: author_id = AUTOJANNY_ID
|
if autojanny: author_id = AUTOJANNY_ID
|
||||||
else: author_id = NOTIFICATIONS_ID
|
else: author_id = NOTIFICATIONS_ID
|
||||||
|
|
||||||
text_html = sanitize(text, alert=True)
|
text_html = sanitize(text)
|
||||||
|
|
||||||
existing_comment = g.db.query(Comment.id).filter_by(author_id=author_id, parent_submission=None, distinguish_level=6, body_html=text_html, created_utc=0).first()
|
existing_comment = g.db.query(Comment.id).filter_by(author_id=author_id, parent_submission=None, distinguish_level=6, body_html=text_html, created_utc=0).first()
|
||||||
|
|
||||||
|
|
|
@ -248,12 +248,12 @@ def transfer_coins(v, username):
|
||||||
else: tax = 0
|
else: tax = 0
|
||||||
|
|
||||||
if TAX_RECEIVER_ID:
|
if TAX_RECEIVER_ID:
|
||||||
log_message = f"[@{v.username}](/id/{v.id}) has transferred {amount} {app.config['COINS_NAME']} to [@{receiver.username}]({receiver.id})"
|
log_message = f"@{v.username} has transferred {amount} {app.config['COINS_NAME']} to @{receiver.username}"
|
||||||
send_repeatable_notification(TAX_RECEIVER_ID, log_message)
|
send_repeatable_notification(TAX_RECEIVER_ID, log_message)
|
||||||
|
|
||||||
receiver.coins += amount-tax
|
receiver.coins += amount-tax
|
||||||
v.coins -= amount
|
v.coins -= amount
|
||||||
send_repeatable_notification(receiver.id, f"🤑 [@{v.username}](/id/{v.id}) has gifted you {amount-tax} {app.config['COINS_NAME']}!")
|
send_repeatable_notification(receiver.id, f":marseycapitalistmanlet: @{v.username} has gifted you {amount-tax} {app.config['COINS_NAME']}!")
|
||||||
g.db.add(receiver)
|
g.db.add(receiver)
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
|
|
||||||
|
@ -280,12 +280,12 @@ def transfer_bux(v, username):
|
||||||
if amount < 100: return {"error": "You have to gift at least 100 marseybux."}, 400
|
if amount < 100: return {"error": "You have to gift at least 100 marseybux."}, 400
|
||||||
|
|
||||||
if TAX_RECEIVER_ID:
|
if TAX_RECEIVER_ID:
|
||||||
log_message = f"[@{v.username}](/id/{v.id}) has transferred {amount} Marseybux to [@{receiver.username}]({receiver.id})"
|
log_message = f"@{v.username} has transferred {amount} Marseybux to @{receiver.username}"
|
||||||
send_repeatable_notification(TAX_RECEIVER_ID, log_message)
|
send_repeatable_notification(TAX_RECEIVER_ID, log_message)
|
||||||
|
|
||||||
receiver.procoins += amount
|
receiver.procoins += amount
|
||||||
v.procoins -= amount
|
v.procoins -= amount
|
||||||
send_repeatable_notification(receiver.id, f"🤑 [@{v.username}](/id/{v.id}) has gifted you {amount} marseybux!")
|
send_repeatable_notification(receiver.id, f":marseycapitalistmanlet: @{v.username} has gifted you {amount} marseybux!")
|
||||||
g.db.add(receiver)
|
g.db.add(receiver)
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue