fixed bug with snappy gambling

master
Aevann1 2022-06-10 16:44:30 +02:00
parent 5db4bd1023
commit abae90fbfd
1 changed files with 2 additions and 1 deletions

View File

@ -1243,6 +1243,8 @@ def submit_post(v, sub=None):
body += f'* [ghostarchive.org](https://ghostarchive.org/search?term={quote(href)}) (click to archive)\n\n'
gevent.spawn(archiveorg, href)
snappy = g.db.query(User).filter_by(id = SNAPPY_ID).one_or_none()
body = body.strip()
if body == '!slots':
body = f'!slots{snappy.coins}'
@ -1262,7 +1264,6 @@ def submit_post(v, sub=None):
g.db.add(c)
snappy = g.db.query(User).filter_by(id = SNAPPY_ID).one_or_none()
snappy.comment_count += 1
snappy.coins += 1
g.db.add(snappy)