aboutsummaryrefslogtreecommitdiff
path: root/bot/src/bot.js
diff options
context:
space:
mode:
authorAndrew Lee <andrew@alee14.me>2025-03-07 17:22:21 -0500
committerAndrew Lee <andrew@alee14.me>2025-03-07 17:22:21 -0500
commitc921e5cf8862def58029bd1801074c51113f86ae (patch)
tree99c8c513fd56863984ee458e747f69a87ad3c715 /bot/src/bot.js
parentcc06b8ed4e4e0aef02dfd8ab15df22a57a177a0a (diff)
downloadAleeBot-c921e5cf8862def58029bd1801074c51113f86ae.tar.gz
AleeBot-c921e5cf8862def58029bd1801074c51113f86ae.tar.bz2
AleeBot-c921e5cf8862def58029bd1801074c51113f86ae.zip
More settings; Better error message; Database
Diffstat (limited to 'bot/src/bot.js')
-rw-r--r--bot/src/bot.js6
1 files changed, 4 insertions, 2 deletions
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);
});