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

11
client/data/addSound.ts Normal file
View File

@@ -0,0 +1,11 @@
import { database } from "../database";
export function AddSoundToDatabase(
fileName: string,
guild: string = "unknown",
user: string = "unknown"
) {
database.serialize(async () => {
await database.run('INSERT INTO sounds (name, guild, user, date) VALUES (?,?,?,?)', [fileName, guild, user, new Date().toISOString()]);
});
}