add_group, add_Channel process modification
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
11
init_db.py
11
init_db.py
@@ -1,5 +1,16 @@
|
||||
import os
|
||||
import asyncio
|
||||
from db import init_db
|
||||
|
||||
# Проверка bot.db перед инициализацией
|
||||
if os.path.exists("bot.db") and os.path.isdir("bot.db"):
|
||||
print("Удаляю папку bot.db...")
|
||||
import shutil
|
||||
|
||||
shutil.rmtree("bot.db")
|
||||
if not os.path.exists("bot.db"):
|
||||
print("Создаю пустой файл bot.db...")
|
||||
open("bot.db", "a").close()
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(init_db())
|
||||
|
||||
Reference in New Issue
Block a user