-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
36 lines (28 loc) · 984 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
34
35
36
const { Client, GatewayIntentBits, Partials, Collection, ActivityType } = require('discord.js')
require('dotenv').config()
const fs = require('fs')
const events = require('./events')
const deploy = require('./deploy')
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.MessageContent
],
partials: [Partials.Channel, Partials.Message, Partials.User, Partials.GuildMember, Partials.Reaction]
});
client.commands = new Collection()
client.slashCommands = new Collection()
const commands = fs.readdirSync('./linear', file => file.endsWith('.js'))
for (const command of commands) {
const file = require(`./linear/${command}`)
client.commands.set(file.name, file)
}
client.prefix = 'dev '
module.exports = client
deploy(client)
events(client)
client.login(process.env.token)