diff --git a/db.py b/db.py deleted file mode 100644 index 3e51150f..00000000 --- a/db.py +++ /dev/null @@ -1,26 +0,0 @@ -import asyncio - -import aiomysql -from decouple import config - -# Get password/host from .env -password = config('DB_PASS') -host = config('DB_HOST') - - -# Setting up connection using pool/aiomysql -async def connection(loop): - pool = await aiomysql.create_pool( - host=host, - port=3306, - user="hamothy", - password=password, - db='enso', - loop=loop) - - return pool - - -# Make sure the connection is setup before the bot is ready -loop = asyncio.get_event_loop() -loop.run_until_complete(connection(loop))