This commit is contained in:
Aevann1 2022-01-22 15:04:30 +02:00
parent 2a4818177a
commit 6ec552c804
4 changed files with 5 additions and 13 deletions

View file

@ -44,8 +44,7 @@ class Slots:
result = self.pull_the_arm(from_user, wagerValue, from_comment)
return { 'pulled': True, 'result': result }
except ValueError:
break
except exception as e: break
return { 'pulled': False, 'result': '' }
# Ensure user is capable of the wager
@ -133,13 +132,9 @@ class Slots:
# Credit the user's account
def credit_user(self, from_user, amount):
from_user.coins += amount
self.db.add(from_user)
self.db.commit()
# Charge the user's account
def charge_user(self, from_user, amount):
from_user.coins -= amount
self.db.add(from_user)
self.db.commit()
self.db.add(from_user)