Add database

This commit is contained in:
Myx
2024-05-12 19:44:36 +02:00
parent 99b1ee39df
commit 1d6f9c3fb2
23 changed files with 112 additions and 67 deletions

9
client/database.ts Normal file
View File

@@ -0,0 +1,9 @@
import { Database } from 'sqlite3';
export const database = new Database('randomMemerDatabase.sqlite');
export function startDatabase() {
database.serialize(() => {
database.run('CREATE TABLE IF NOT EXISTS sounds (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, guild TEXT, user TEXT, date TEXT)');
});
}