tweak last commit

remotes/1693045480750635534/spooky-22
Aevann1 2022-09-20 04:55:38 +02:00
parent 1a8439b461
commit 6e3e05c6e1
1 changed files with 8 additions and 1 deletions

View File

@ -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(