Implement "special games" game check for badge handling
This commit is contained in:
1 parent
7ad84d5b5f
commit
165f9eccb3
3 files changed
+21
-9
No files matched your search
@@ -402,6 +402,8 @@ class AwaitableValue(Generic[_T]):
|
||||
|
||||
|
||||
class Game:
|
||||
SPECIAL_EVENTS_GAME_ID: int = 509663
|
||||
|
||||
def __init__(self, data: JsonType):
|
||||
self.id: int = int(data["id"])
|
||||
self.name: str = data.get("displayName") or data["name"]
|
||||
@@ -434,3 +436,6 @@ class Game:
|
||||
# strip and collapse dashes
|
||||
slug_text = re.sub(r'-{2,}', '-', slug_text.strip('-'))
|
||||
return slug_text
|
||||
|
||||
def is_special_events(self) -> bool:
|
||||
return self.id == self.SPECIAL_EVENTS_GAME_ID
|
||||
Reference in new issue
Block a user