fix: added a cog_load function to run create_table

This commit is contained in:
Seaswimmer 2023-08-01 22:39:46 -04:00
parent eead3223d1
commit 95b4abd8bb
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -20,8 +20,6 @@ class MusicDownloader(commands.Cog):
def create_table(self): def create_table(self):
data_path = str(data_manager.cog_data_path()) + f"{os.sep}MusicDownloader" data_path = str(data_manager.cog_data_path()) + f"{os.sep}MusicDownloader"
if not os.path.isdir(data_path):
os.makedirs(data_path)
db_path = os.path.join(data_path, "database.db") db_path = os.path.join(data_path, "database.db")
if not os.path.isfile(db_path): if not os.path.isfile(db_path):
con = sqlite3.connect(db_path) con = sqlite3.connect(db_path)