import { Routes } from "discord.js"; import { DiscordBot } from "./bot"; import { APPLICATION_ID, DISCORD_TOKEN } from "./env"; import "@qwreey-js/kotlin-scope-func"; export const bot = new DiscordBot(DISCORD_TOKEN); bot.client.once("clientReady", async (client) => { await bot.registerCommands(); bot.registerEvents(); console.log( "registerCommands: \n| " + ( (await client.rest.get( Routes.applicationCommands(APPLICATION_ID), )) as any[] ) .map((info) => `name: ${info.name} id: ${info.id}`) .join("\n| "), ); }); await bot.client.login(DISCORD_TOKEN);