3
2
forked from Dniel97/artemis

添加 titles/FGOA/base.py

This commit is contained in:
FGO 2024-04-01 18:59:54 +00:00
parent d1b377eef3
commit b8bf9ca506

30
titles/FGOA/base.py Normal file
View File

@ -0,0 +1,30 @@
from datetime import date, datetime, timedelta
from typing import Any, Dict, List
import json
import logging
from enum import Enum
from core.config import CoreConfig
from titles.fgoa.config import FGOAConfig
from titles.fgoa.const import FGOAConstants
class FGOABase:
def __init__(self, core_cfg: CoreConfig, game_cfg: FGOAConfig) -> None:
self.core_cfg = core_cfg
self.game_config = game_cfg
self.date_time_format = "%Y-%m-%d %H:%M:%S"
self.date_time_format_ext = (
"%Y-%m-%d %H:%M:%S.%f" # needs to be lopped off at [:-5]
)
self.date_time_format_short = "%Y-%m-%d"
self.logger = logging.getLogger("fgoa")
self.game = FGOAConstants.GAME_CODE
self.version = FGOAConstants.VER_FGOA_SEASON_1
@staticmethod
def _parse_int_ver(version: str) -> str:
return version.replace(".", "")[:3]
async def handle_game_init_request(self, data: Dict) -> Dict:
return f""