14 lines
314 B
Python
14 lines
314 B
Python
import aiosqlite
|
|
|
|
class Database:
|
|
def __init__(self):
|
|
self.conn = None
|
|
|
|
async def connect(self):
|
|
if self.conn is None:
|
|
self.conn = await aiosqlite.connect("FemBot.db")
|
|
return self.conn
|
|
|
|
async def close(self):
|
|
if self.conn:
|
|
await self.conn.close() |