17 lines
373 B
JavaScript
17 lines
373 B
JavaScript
|
const { Client, Intents } = require('discord.js');
|
||
|
const dotenv = require('dotenv');
|
||
|
|
||
|
// Load .env
|
||
|
dotenv.config();
|
||
|
|
||
|
// Create a new client instance
|
||
|
const client = new Client({ intents: [Intents.FLAGS.GUILDS] });
|
||
|
|
||
|
// When the client is ready
|
||
|
client.once('ready', () => {
|
||
|
console.log('Prêt !');
|
||
|
});
|
||
|
|
||
|
// Login to Discord with token
|
||
|
client.login(process.env.DISCORD_TOKEN);
|