forked from MarseyWorld/MarseyWorld
fds
parent
5f6f846f7d
commit
11e4cfc5f7
|
@ -190,7 +190,7 @@ def remove_meme_admin(v, username):
|
||||||
def monthly(v):
|
def monthly(v):
|
||||||
if request.host == 'rdrama.net' and v.id != 1: abort (403)
|
if request.host == 'rdrama.net' and v.id != 1: abort (403)
|
||||||
|
|
||||||
thing = g.db.query(AwardRelationship).order_by(AwardRelationship.id.desc()).one_or_none().id
|
thing = g.db.query(AwardRelationship).order_by(AwardRelationship.id.desc()).first().id
|
||||||
|
|
||||||
data = {'access_token': GUMROAD_TOKEN}
|
data = {'access_token': GUMROAD_TOKEN}
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ def buy(v, award):
|
||||||
if award == "lootbox":
|
if award == "lootbox":
|
||||||
send_repeatable_notification(995, f"@{v.username} bought a lootbox!")
|
send_repeatable_notification(995, f"@{v.username} bought a lootbox!")
|
||||||
for i in [1,2,3,4,5]:
|
for i in [1,2,3,4,5]:
|
||||||
thing = g.db.query(AwardRelationship).order_by(AwardRelationship.id.desc()).one_or_none().id
|
thing = g.db.query(AwardRelationship).order_by(AwardRelationship.id.desc()).first().id
|
||||||
thing += 1
|
thing += 1
|
||||||
award = random.choice(["snow", "gingerbread", "lights", "candycane", "fireplace"])
|
award = random.choice(["snow", "gingerbread", "lights", "candycane", "fireplace"])
|
||||||
award = AwardRelationship(id=thing, user_id=v.id, kind=award)
|
award = AwardRelationship(id=thing, user_id=v.id, kind=award)
|
||||||
|
@ -167,7 +167,7 @@ def buy(v, award):
|
||||||
send_notification(v.id, f"@AutoJanny has given you the following profile badge:\n\n![]({new_badge.path})\n\n{new_badge.name}")
|
send_notification(v.id, f"@AutoJanny has given you the following profile badge:\n\n![]({new_badge.path})\n\n{new_badge.name}")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
thing = g.db.query(AwardRelationship).order_by(AwardRelationship.id.desc()).one_or_none().id
|
thing = g.db.query(AwardRelationship).order_by(AwardRelationship.id.desc()).first().id
|
||||||
thing += 1
|
thing += 1
|
||||||
award = AwardRelationship(id=thing, user_id=v.id, kind=award)
|
award = AwardRelationship(id=thing, user_id=v.id, kind=award)
|
||||||
g.db.add(award)
|
g.db.add(award)
|
||||||
|
@ -547,7 +547,7 @@ def admin_userawards_post(v):
|
||||||
|
|
||||||
notify_awards = {}
|
notify_awards = {}
|
||||||
|
|
||||||
latest = g.db.query(AwardRelationship).order_by(AwardRelationship.id.desc()).one_or_none()
|
latest = g.db.query(AwardRelationship).order_by(AwardRelationship.id.desc()).first()
|
||||||
thing = latest.id
|
thing = latest.id
|
||||||
|
|
||||||
for key, value in request.values.items():
|
for key, value in request.values.items():
|
||||||
|
|
Loading…
Reference in New Issue