Added commands I think

This commit is contained in:
JustMaffie
2017-05-28 00:22:30 +02:00
parent 779f89518b
commit 358647fc48
2 changed files with 4 additions and 9 deletions

View File

@ -18,13 +18,9 @@ from titanembeds.database.unauthenticated_bans import UnauthenticatedBans
class DatabaseInterface(object):
# Courtesy of https://github.com/SunDwarf/Jokusoramame
def __init__(self, bot):
async def __init__(self, bot, dburi):
self.bot = bot
self.engine = None # type: Engine
self._sessionmaker = None # type: sessionmaker
async def connect(self, dburi):
async with threadpool():
self.engine = create_engine(dburi, pool_recycle=10)
self._sessionmaker = sessionmaker(bind=self.engine, expire_on_commit=False)