SQLite Setup
This commit is contained in:
1 parent
7882ba4915
commit
d564756511
5 files changed
+64
-10
No files matched your search
@@ -0,0 +1,14 @@
|
||||
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()
|
||||
Reference in new issue
Block a user