-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
38 lines (33 loc) · 1.16 KB
/
index.js
File metadata and controls
38 lines (33 loc) · 1.16 KB
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
//https://discord.com/api/oauth2/authorize?client_id=872846014837584024&permissions=122726720641&scope=bot
const Discord = require('discord.js')
// https://discord.com/developers/docs/topics/gateway
const intents = [
"GUILDS",
"GUILD_MEMBERS",
"GUILD_WEBHOOKS",
"GUILD_INVITES",
"GUILD_VOICE_STATES",
"GUILD_MESSAGES",
]
const client = new Discord.Client({intents: intents, partials: ['MESSAGE'], makeCache: Discord.Options.cacheWithLimits({
MessageManager: 1, // This is default
PresenceManager: 0,
// Add more class names here
})})
const {readfile} = require(__dirname + '/_file.js')
const importer = require(__dirname + '/_importer.js')
require(__dirname + '/_config.js') // Init config
const modules = importer.import(__dirname + '/modules/')
for (let key in modules) {
if (modules[key].start) {
modules[key].start(client, __dirname)
}
}
readfile('token.txt', function(token) {client.login(token)}, console.log)
/*
const http = require('http')
http.createServer(function (request, response) {
response.writeHead(200, {"Content-Type": "text/plain"})
response.end("HELP MEEEEEE!!!!!!!!!!!!\n")
}).listen(process.env.PORT)
*/