Skip to content
This repository has been archived by the owner on Jun 10, 2023. It is now read-only.

Commit

Permalink
Merge branch 'rewrite' of https://github.com/RealistikDash/GDPyS into…
Browse files Browse the repository at this point in the history
… rewrite
  • Loading branch information
spookybear0 committed Sep 30, 2020
2 parents c6b2c80 + 8368362 commit 4794665
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion helpers/levelhelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from helpers.timehelper import get_timestamp
from helpers.crypthelper import hash_sha1
from conn.mysql import myconn
from objects.levels import Level, Rating
from objects.levels import Level, Rating, DailyLevel
from config import user_config
from aiofile import AIOFile
import logging
Expand All @@ -12,6 +12,7 @@ class LevelHelper():
def __init__(self):
"""Inits the level helper."""
self.level_cache = {}
self.daily = None # is DailyLevel object if cached.

async def _create_level_obj(self, level_id : int) -> Level:
"""Private function that creates a level object from db."""
Expand Down
8 changes: 8 additions & 0 deletions objects/levels.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,11 @@ class Rating():
epic : bool
verified_coins : bool
demon_diff : int

@dataclass
class DailyLevel():
"""Daily level dataclass"""
ID : int
level_id : int
timestamp : int
weekly : bool

0 comments on commit 4794665

Please sign in to comment.