mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2026-10-11 22:02:06 +00:00
feat: add clear method to StoredInt and StoredCounter classes
This commit is contained in:
@@ -134,6 +134,9 @@ class StoredExpiredAtMonday0400(StoredBase):
|
||||
class StoredInt(StoredBase):
|
||||
value = 0
|
||||
|
||||
def clear(self):
|
||||
self.value = 0
|
||||
|
||||
|
||||
class StoredCounter(StoredBase):
|
||||
value = 0
|
||||
@@ -148,6 +151,9 @@ class StoredCounter(StoredBase):
|
||||
self.value = value
|
||||
self.total = total
|
||||
|
||||
def clear(self):
|
||||
self.value = 0
|
||||
|
||||
def to_counter(self) -> str:
|
||||
return f'{self.value}/{self.total}'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user