Merge branch 'split-guild-and-global' of github.com:TeamNewGuys/tachi-bot into split-guild-and-global

This commit is contained in:
Noah Heague
2021-09-05 16:42:09 +10:00
+5 -2
View File
@@ -2,6 +2,9 @@ import { Client, Intents } from "discord.js";
import { LoggerLayers } from "./config";
import { registerSlashCommands, slashCommands, SlashCommand } from "./slashCommands/register";
import { createLayeredLogger } from "./utils/logger";
import { config } from "dotenv";
config();
const logger = createLayeredLogger(LoggerLayers.client);
@@ -40,8 +43,8 @@ client.on("interactionCreate", async (interaction) => {
await client.login(process.env.DISCORD_TOKEN);
logger.info(`Logged in successfully to ${client.guilds.cache.size} guilds`);
logger.info(`https://discord.com/api/oauth2/authorize?client_id=${client.application.id}&permissions=8&scope=applications.commands%20bot`);
await registerSlashCommands(client);
await registerSlashCommands(client);
} catch (e) {
logger.error("Log in Failed:", e);
}