summaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
authorJoe Robinson <joe@lc8n.com>2021-11-28 18:42:55 +0000
committerJoe Robinson <joe@lc8n.com>2021-11-28 18:42:55 +0000
commitdfade65d2859188de22be990f4cbc1f0c7602735 (patch)
tree50b93b669ce46b48ab164edc63321a44995b8d81 /models
parent0c4b6e6e8c69709e638cc28d1ba338c5388f342c (diff)
Add commands
Diffstat (limited to 'models')
-rw-r--r--models/user.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/models/user.py b/models/user.py
index dcf35ab..c38135d 100644
--- a/models/user.py
+++ b/models/user.py
@@ -1,6 +1,5 @@
from peewee import TextField, IntegerField, DateTimeField
import datetime
-import random
from base import BaseModel
@@ -15,14 +14,11 @@ class User(BaseModel):
currency = IntegerField()
message_count = IntegerField()
joined_date = DateTimeField(default=datetime.datetime.now)
+ exp_gained_time = DateTimeField(default=datetime.datetime.now)
+ daily_gained_time = DateTimeField(default=datetime.datetime.now)
def add_coins(self, additional_coins: int):
self.currency = self.currency + additional_coins
def remove_coins(self, lost_coins: int):
self.currency = self.currency - lost_coins
-
- def add_message(self):
- self.message_count += 1
- gained_exp = random.randrange(10, 15)
- self.exp += gained_exp