-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
33 lines (25 loc) · 941 Bytes
/
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
const { Client, GatewayIntentBits, Partials, Collection } = require('discord.js');
const fs = require('fs');
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.MessageContent
],
partials: [Partials.Channel, Partials.Message, Partials.User, Partials.GuildMember, Partials.Reaction],
ws: { properties: { browser: 'Discord iOS' } }
});
const config = require('./config.json');
require('dotenv').config() // remove this line if you are using replit
client.commands = new Collection()
client.aliases = new Collection()
client.slashCommands = new Collection();
client.prefix = config.prefix
module.exports = client;
fs.readdirSync('./handlers').forEach((handler) => {
require(`./handlers/${handler}`)(client)
});
client.login(process.env.TOKEN)