forked from MarseyWorld/MarseyWorld
tweak last commit
parent
1a8439b461
commit
6e3e05c6e1
|
@ -132,10 +132,17 @@ def give_monthly_marseybux_task_kofi():
|
|||
month = datetime.datetime.now() + datetime.timedelta(days=5)
|
||||
month = month.strftime('%B')
|
||||
|
||||
tx_emails = [x[0] for x in g.db.query(Transaction.email).distinct().all()]
|
||||
|
||||
for u in g.db.query(User).filter(User.patron > 0, User.patron_utc == 0).all():
|
||||
g.db.add(u)
|
||||
|
||||
if not (u.is_activated and u.email in tx_emails):
|
||||
u.patron = 0
|
||||
continue
|
||||
|
||||
procoins = procoins_li[u.patron]
|
||||
u.procoins += procoins
|
||||
g.db.add(u)
|
||||
send_repeatable_notification(u.id, f"@AutoJanny has given you {procoins} Marseybux for the month of {month}! You can use them to buy awards in the [shop](/shop).")
|
||||
|
||||
ma = ModAction(
|
||||
|
|
Loading…
Reference in New Issue