gfs
This commit is contained in:
parent
cc03c7b09d
commit
f1a2f637d2
2 changed files with 8 additions and 4 deletions
|
@ -213,6 +213,7 @@ def monthly(v):
|
||||||
|
|
||||||
for u in g.db.query(User).filter(User.patron > 0, User.patron_utc == 0).all():
|
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:
|
if u.email and u.email.lower() in emails:
|
||||||
|
continue
|
||||||
if u.patron == 1: procoins = 2500
|
if u.patron == 1: procoins = 2500
|
||||||
elif u.patron == 2: procoins = 5000
|
elif u.patron == 2: procoins = 5000
|
||||||
elif u.patron == 3: procoins = 10000
|
elif u.patron == 3: procoins = 10000
|
||||||
|
@ -222,18 +223,18 @@ def monthly(v):
|
||||||
g.db.add(u)
|
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).")
|
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:
|
elif u.patron == 5:
|
||||||
|
continue
|
||||||
procoins = 50000
|
procoins = 50000
|
||||||
u.procoins += procoins
|
u.procoins += procoins
|
||||||
g.db.add(u)
|
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).")
|
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:
|
elif u.patron == 1 and u.admin_level > 0:
|
||||||
|
continue
|
||||||
procoins = 2500
|
procoins = 2500
|
||||||
u.procoins += procoins
|
u.procoins += procoins
|
||||||
g.db.add(u)
|
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).")
|
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:
|
else: print(u.username)
|
||||||
print(u.username)
|
|
||||||
continue
|
|
||||||
|
|
||||||
if request.host == 'pcmemes.net':
|
if request.host == 'pcmemes.net':
|
||||||
u = g.db.query(User).filter_by(id=KIPPY_ID).one()
|
u = g.db.query(User).filter_by(id=KIPPY_ID).one()
|
||||||
|
|
|
@ -219,8 +219,11 @@ def api_comment(v):
|
||||||
try:
|
try:
|
||||||
marsey = loads(body.lower())
|
marsey = loads(body.lower())
|
||||||
name = marsey["name"]
|
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():
|
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)
|
g.db.add(marsey)
|
||||||
filename = f'files/assets/images/emojis/{name}.webp'
|
filename = f'files/assets/images/emojis/{name}.webp'
|
||||||
copyfile(oldname, filename)
|
copyfile(oldname, filename)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue