17 lines
444 B
Python
17 lines
444 B
Python
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())
|