22 lines
636 B
TypeScript
22 lines
636 B
TypeScript
|
|
import { configDotenv } from "dotenv";
|
|
|
|
configDotenv(); // apparently init does not get executed
|
|
|
|
const client = (await import("./bot")).default;
|
|
|
|
|
|
// query TEST
|
|
(async function () {
|
|
// async imports because yes
|
|
const { db } = await import("./db/database");
|
|
const { count } = await import("drizzle-orm");
|
|
const { users } = await import("./db/schema");
|
|
const chalk = (await import("chalk")).default;
|
|
const uCount = (await db.select({ count: count() }).from(users))[0].count;
|
|
console.log(`Watching over ${chalk.bold(uCount)} users`);
|
|
})().then(() => { });
|
|
// END query TEST
|
|
|
|
client.login(process.env.TOKEN);
|
|
|