FEAT: Added Privacy Policy/TOS
REF: Changed Birthday and Currency Modules to use a single Database (cut down on some space) FEAT: Added a list of always enabled modules and modules that can be disabled.
This commit is contained in:
30
modules/data/db.py
Normal file
30
modules/data/db.py
Normal file
@ -0,0 +1,30 @@
|
||||
import sqlite3
|
||||
|
||||
|
||||
def initialize_db():
|
||||
conn = sqlite3.connect('selena.db')
|
||||
cursor = conn.cursor()
|
||||
|
||||
# Birthdays table
|
||||
cursor.execute('''
|
||||
CREATE TABLE IF NOT EXISTS birthdays (
|
||||
user_id TEXT PRIMARY KEY,
|
||||
birthday TEXT
|
||||
)
|
||||
''')
|
||||
|
||||
# Currency table
|
||||
cursor.execute('''
|
||||
CREATE TABLE IF NOT EXISTS currency (
|
||||
user_id TEXT PRIMARY KEY,
|
||||
balance INTEGER,
|
||||
last_earned TIMESTAMP
|
||||
)
|
||||
''')
|
||||
|
||||
conn.commit()
|
||||
conn.close()
|
||||
|
||||
|
||||
def get_connection():
|
||||
return sqlite3.connect('selena.db')
|
Reference in New Issue
Block a user