-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
77 lines (69 loc) · 2.25 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
let runType;
if (process.argv[2] === "start") { runType = 0; }
else if (process.argv[2] === "test") { runType = 1; }
else { runType = 2; console.error("ERR! Correct launch: \"node index.js test|start\""); process.exit(4); }
export { runType };
import { setup as setupLogs } from "./src/functions/logSystem.js";
await setupLogs();
console.log("-------------------------------> LEA Bot <-------------------------------");
if (runType === 0) console.log(" starting... ");
if (runType === 1) console.log(" testing... ");
console.log("");
import { config as secret } from "dotenv";
import { Client, GatewayIntentBits, Collection } from "discord.js";
let bot = new Client({
intents: [
GatewayIntentBits.DirectMessages,
GatewayIntentBits.DirectMessageReactions,
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.MessageContent
]
});
bot.slashes = new Collection();
bot.ints = new Map();
bot.LEA = {
c: {
LEAbot: "#3a9a97",
LSPD: "#000c1e",
SAHP: "#457cc0",
LSSD: "#bd8131",
LSCSO: "#b68f68",
duty: "#5245c0",
apology: "#c05245",
summary: "#25be5c",
event: "#Be25ab",
deleted: "#c43136"
},
i: {
LEAbot: "https://i.imgur.com/EnZErOi.png",
LSPD: "https://i.imgur.com/gfL0fGf.png",
SAHP: "https://i.imgur.com/xgFoKuX.png",
LSSD: "https://i.imgur.com/X3cH2iu.png",
LSCSO: "https://i.imgur.com/Hex0MQF.png"
},
e: {
LSPD: "<:LSPD:1178108366514565181>",
SAHP: "<:SAHP:1174876044570931210>",
LSSD: "<:LSSD:1178106303198011412>",
LSCSO: "<:LSCSO:1266078681479254176>"
},
g: {
LSPD: [],
LSSD: [
"1154446248934387828"
],
SAHP: [
"1301163398515396668"
]
}
};
import { events, commands, interactions } from "./src/functions/register.js";
events(bot);
commands(bot);
interactions(bot);
bot.login(secret().parsed.botToken);
export { bot };