-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
49 lines (44 loc) · 1.35 KB
/
index.js
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
const { Client, GatewayIntentBits, Partials } = require("discord.js");
require("dotenv").config();
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.GuildMessageTyping,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildPresences,
],
partials: [Partials.Channel, Partials.Message],
});
// {
// "port": "6724",
// "evalChannel": "1206602282205061150",
// "aiChannel": "1201573269501923368",
// "guildID": "1083399687467438182",
// "sumanaRoleID": "1208400649692127232",
// "userID": "1214625981059305503",
// "countChannel": "1188425706888241253",
// "countRole": "1087750196215156767"
// }
client.config = {
port: process.env.port,
evalChannel: process.env.evalChannel,
aiChannel: process.env.aiChannel,
guildID: process.env.guildID,
sumanaRoleID: process.env.sumanaRoleID,
userID: process.env.userID,
countChannel: process.env.countChannel,
countRole: process.env.countRole,
};
// Error handling
client.on("error", console.error);
process.on("unhandledRejection", console.error);
require("fs")
.readdirSync("./functions")
.forEach((file) => {
require(`./functions/${file}`)(client);
});
client.login(process.env.token);