Containerize

This commit is contained in:
Benjamin Morgan 2025-12-25 22:48:27 -07:00
parent 71dcefcf01
commit dee736bd54
7 changed files with 59 additions and 8 deletions

View file

@ -1,6 +1,4 @@
# TODO: Change hours column to boolean, drop times table, make it a column in servers
# TODO: Containerize, include sql script to initialize empty database if one does not exist in volume
# TODO: CICD deploy over live instance via compose
# TODO: prevent sql injection
# TODO: annotate return types everywhere
# TODO: split cogs into separate files, add utils file, remove globals
@ -21,12 +19,8 @@ from typing import Union, List
import sqlite3
import discord
from discord.ext import commands
from dotenv import load_dotenv
from mcstatus import JavaServer
# Load environment variables
load_dotenv('.env')
# Bot Initialization
intents = discord.Intents.default()
intents.messages = True
@ -356,7 +350,7 @@ async def getStatus(serv: JavaServer):
def connect():
mydb = sqlite3.connect('mstbot.db')
mydb = sqlite3.connect('/data/mstbot.db')
cursor = mydb.cursor()
return mydb, cursor