From 1a1fc71a8eebb8d624b286a9164d1d039bebe29e Mon Sep 17 00:00:00 2001 From: sgoudham Date: Mon, 3 Aug 2020 14:59:52 +0100 Subject: [PATCH] Deleted db.py --- db.py | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 db.py 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))