architecture besides db setup, say+roll
This commit is contained in:
24
index.ts
Normal file
24
index.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { Client, BaseInteraction } from "discord.js";
|
||||
import { config } from "dotenv";
|
||||
|
||||
//import db from "./db";
|
||||
import run from "./commands";
|
||||
|
||||
config();
|
||||
|
||||
const client = new Client({ intents: [] });
|
||||
|
||||
client.on("ready", async () => {
|
||||
console.log(`Logged in as ${client.user.tag}`);
|
||||
//
|
||||
});
|
||||
|
||||
client.on("interactionCreate", async (interaction: BaseInteraction) => {
|
||||
//
|
||||
if (interaction.isChatInputCommand()) {
|
||||
return await run(interaction);
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(() => client.login(process.env.DISCORD_TOKEN), 2000);
|
||||
|
||||
Reference in New Issue
Block a user