Files
BotsCord/bot/index.js
T

21 lines
603 B
JavaScript
Raw Normal View History

2022-07-30 16:09:49 +02:00
// Create discord.js client
const { Client, GatewayIntentBits } = require('discord.js');
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.GuildMessageTyping,
GatewayIntentBits.DirectMessages,
2022-07-30 16:19:58 +02:00
2022-07-30 16:09:49 +02:00
]
});
2022-07-30 16:19:58 +02:00
client.config = require('../config');
2022-07-30 16:09:49 +02:00
// Set intents
client.on('ready', () => {
console.log('Bot is ready!');
});
// Login
2022-07-30 16:19:58 +02:00
client.login(client.config.bot.token);