remotes/1693045480750635534/spooky-22
Aevann1 2022-01-30 23:00:48 +02:00
parent 2d60a1af62
commit 72a0dcc64e
2 changed files with 8 additions and 4 deletions

View File

@ -213,6 +213,7 @@ def monthly(v):
for u in g.db.query(User).filter(User.patron > 0, User.patron_utc == 0).all():
if u.email and u.email.lower() in emails:
continue
if u.patron == 1: procoins = 2500
elif u.patron == 2: procoins = 5000
elif u.patron == 3: procoins = 10000
@ -222,18 +223,18 @@ def monthly(v):
g.db.add(u)
send_repeatable_notification(u.id, f"You were given {procoins} Marseybux for the month of {month}! You can use them to buy awards in the [shop](/shop).")
elif u.patron == 5:
continue
procoins = 50000
u.procoins += procoins
g.db.add(u)
send_repeatable_notification(u.id, f"You were given {procoins} Marseybux for the month of {month}! You can use them to buy awards in the [shop](/shop).")
elif u.patron == 1 and u.admin_level > 0:
continue
procoins = 2500
u.procoins += procoins
g.db.add(u)
send_repeatable_notification(u.id, f"You were given {procoins} Marseybux for the month of {month}! You can use them to buy awards in the [shop](/shop).")
else:
print(u.username)
continue
else: print(u.username)
if request.host == 'pcmemes.net':
u = g.db.query(User).filter_by(id=KIPPY_ID).one()

View File

@ -219,8 +219,11 @@ def api_comment(v):
try:
marsey = loads(body.lower())
name = marsey["name"]
if "author" in marsey: author_id = get_user(marsey["author"])
elif "author_id" in marsey: author_id = marsey["author_id"]
else: abort(400)
if not g.db.query(Marsey.name).filter_by(name=name).first():
marsey = Marsey(name=marsey["name"], author_id=marsey["author_id"], tags=marsey["tags"], count=0)
marsey = Marsey(name=marsey["name"], author_id=author_id, tags=marsey["tags"], count=0)
g.db.add(marsey)
filename = f'files/assets/images/emojis/{name}.webp'
copyfile(oldname, filename)