mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2026-10-21 11:42:12 +00:00
feat: add method to increment value in StoredCounter
This commit is contained in:
@@ -157,6 +157,9 @@ class StoredCounter(StoredBase):
|
|||||||
def get_remain(self) -> int:
|
def get_remain(self) -> int:
|
||||||
return self.total - self.value
|
return self.total - self.value
|
||||||
|
|
||||||
|
def add(self, value=1):
|
||||||
|
self.value += value
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def _attrs(self) -> dict:
|
def _attrs(self) -> dict:
|
||||||
attrs = super()._attrs
|
attrs = super()._attrs
|
||||||
|
|||||||
Reference in New Issue
Block a user