From c921e5cf8862def58029bd1801074c51113f86ae Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Fri, 7 Mar 2025 17:22:21 -0500 Subject: More settings; Better error message; Database --- bot/src/bot.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bot/src/bot.js') diff --git a/bot/src/bot.js b/bot/src/bot.js index ff03b06..3236817 100644 --- a/bot/src/bot.js +++ b/bot/src/bot.js @@ -1,11 +1,13 @@ import { Client, GatewayIntentBits } from 'discord.js'; import 'dotenv/config'; import { init } from './init.js'; -const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildMessages] }); +const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildBans ] }); init(client); -client.login(process.env.token).catch(function() { +client.login(process.env.token).then(() => { + console.log('[>] Successfully authenticated.'); +}).catch(() => { console.log('[X] Login failed. The token that you have put in is invalid.'); process.exit(1); }); -- cgit v1.2.3