WIP: Add basic code for storing settings in the DB
This commit is contained in:
5
index.ts
5
index.ts
@@ -5,7 +5,7 @@ import type {
|
||||
SlashCommandOptionsOnlyBuilder,
|
||||
} from "discord.js";
|
||||
|
||||
import { sql } from "./database";
|
||||
import { sql, GuildSetting, initDb } from "./database";
|
||||
|
||||
const BLITZCRANK_BANNER = `
|
||||
****++++++++++*+++
|
||||
@@ -145,6 +145,9 @@ client.on(Events.InteractionCreate, async (interaction: Interaction) => {
|
||||
|
||||
client.once(Events.ClientReady, async (readyClient) => {
|
||||
await syncCommands();
|
||||
initDb(); // TODO
|
||||
GuildSetting.sync(); // TODO
|
||||
|
||||
for (const [_name, cmd] of commands) {
|
||||
await cmd?.initialize({
|
||||
client: client,
|
||||
|
||||
Reference in New Issue
Block a user