-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
35 lines (29 loc) · 1.01 KB
/
app.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
const config = require('./config.json');
const Client = require('./src/Client.js');
const { Intents } = require('discord.js');
global.__basedir = __dirname;
// Client setup
const intents = new Intents();
intents.add(
'GUILDS',
'GUILD_VOICE_STATES',
'GUILD_MESSAGES',
'GUILD_MESSAGE_REACTIONS'
);
const client = new Client(config, { ws: { intents: intents } });
// Initialize client
function init() {
client.loadEvents('./src/events');
client.loadCommands('./src/commands');
client.login(process.env['token']);
//Put your token in config.json
//To change prefix, go to: src/utils/db.js, go to line 21 and change "f!" to anything you want if you have not run the project yet. If you have run the project, delete all the sqlite files in the data folder before you change the prefix.
}
init();
process.on('unhandledRejection', err => client.logger.error(err));
const http = require('http');
const server = http.createServer((req, res) => {
res.writeHead(200);
res.end('psy is online!');
});
server.listen(3000);