将数据库操作封装成类,并添加数据库路径的config选项

This commit is contained in:
2022-08-09 02:12:29 +08:00
parent 69e4cb97e3
commit b320a23c77
7 changed files with 110 additions and 103 deletions

View File

@@ -3,3 +3,4 @@ from pydantic import BaseModel
class Config(BaseModel):
cache_path: str = 'cache/nonebot_plugin_tetris_stats/cache'
db_path: str = 'data/nonebot_plugin_tetris_stats/data.db'