Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/init.py

19 lines
423 B
Python
Raw Normal View History

2021-08-20 16:32:46 +00:00
import os
import shutil
2021-08-23 12:44:31 +00:00
2021-08-21 15:58:07 +00:00
from config import Config
2021-08-23 12:44:31 +00:00
from database import BotDBUtil
2021-08-20 16:32:46 +00:00
def init_bot():
cache_path = os.path.abspath('./cache/')
if os.path.exists(cache_path):
shutil.rmtree(cache_path)
os.mkdir(cache_path)
else:
os.mkdir(cache_path)
2021-08-21 15:58:07 +00:00
base_superuser = Config('base_superuser')
if base_superuser:
BotDBUtil.SenderInfo(base_superuser).edit('isSuperUser', True)