forked from Ruwin-dsc/Better-Protect-Remade
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
64 lines (46 loc) · 1.64 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
const {
Client,
Collection,
GatewayIntentBits,
Partials
} = require("discord.js");
const bot = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.GuildBans,
GatewayIntentBits.GuildEmojisAndStickers,
GatewayIntentBits.GuildInvites,
GatewayIntentBits.GuildWebhooks
],
partials: [
Partials.Channel,
Partials.Message,
Partials.User,
Partials.GuildMember,
Partials.Reaction,
Partials.ThreadMember,
Partials.GuildScheduledEvent
],
});
bot.slashcommand = new Collection()
bot.commands = new Collection();
bot.aliases = new Collection();
bot.emojis = require("./utils/emojis.json")
bot.config = require("./config.json")
const command = require('./handlers/command.js')(bot)
const eventdHandler = require("./handlers/event.js")(bot);
const slashcommandHandler = require("./handlers/loadslashcommand.js")(bot);
const loadDatabase = require("./handlers/loadDatabase");
const DataBase = require("./handlers/loginDatabase");
const config = require("./slashcommands/config.js");
DataBase.connectDatabase(bot);
const anticrashHandler = require('./utils/anticrash')(bot)
if(config.apikey == "") console.log("Veuillez renseignez la clé API à l'aide de la doc: https://developers.perspectiveapi.com/s/docs-get-started?language=en_US ou demandez une clé sur https://discord.gg/uhq"), process.exit()
bot.login(bot.config.token)