index: commit initial file
This commit is contained in:
parent
d2bf2a1f32
commit
d175a967a8
1 changed files with 15 additions and 0 deletions
15
index.js
Normal file
15
index.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
// Require the necessary discord.js classes
|
||||
const { Client, Events, GatewayIntentBits } = require('discord.js');
|
||||
const { token } = require('./config.json');
|
||||
|
||||
// Create a new client instance
|
||||
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
|
||||
|
||||
// When the client is ready, run this code (only once)
|
||||
// We use 'c' for the event parameter to keep it separate from the already defined 'client'
|
||||
client.once(Events.ClientReady, c => {
|
||||
console.log(`Ready! Logged in as ${c.user.tag}`);
|
||||
});
|
||||
|
||||
// Log in to Discord with your client's token
|
||||
client.login(token);
|
Loading…
Reference in a new issue