-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
29 lines (18 loc) · 678 Bytes
/
index.js
File metadata and controls
29 lines (18 loc) · 678 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const { Client, Intents } = require('discord.js');
const client = new Client({
intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_PRESENCES
]
});
const fs = require('fs');
const { prefix, token } = require('./config.json');
// Require the statusupdate function
const statusUpdateFunction = require('./statuspage');
// Once your client is logged in and ready, call the statusUpdateFunction with the client
client.once('ready', () => {
console.log('Logged in as ' + client.user.tag);
statusUpdateFunction(client); // Call the status update function and pass the client
});
client.login(token);