-
Notifications
You must be signed in to change notification settings - Fork 40
/
index.js
55 lines (51 loc) · 1.79 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
52
53
54
55
const { Client, Message, MessageEmbed, Collection } = require("discord.js");
const db =require("quick.db");
const fs = require("fs");
const config = require("./config.json");
const dotenv = require("dotenv").config();
const token = process.env.TOKEN;
// Credit to Supreme#2401
const client = new Client({
messageCacheLifetime: 60,
fetchAllMembers: false,
messageCacheMaxSize: 10,
restTimeOffset: 0,
restWsBridgetimeout: 100,
shards: "auto",
partials: ["MESSAGE", "CHANNEL", "REACTION"],
intents: 32767,
});
module.exports = client;
require("./events/message.js")
require("./events/ready.js")
client.commands = new Collection();
client.aliases = new Collection();
fs.readdir("./commands/", (err, files) => {
if (err) console.error(err);
console.log(`${files.length} Total Command!`);
files.forEach(f => {
let props = require(`./commands/${f}`);
console.log(`${props.help.name} command is loaded!`);
client.commands.set(props.help.name, props);
props.conf.aliases.forEach(alias => {
client.aliases.set(alias, props.help.name);
});
});
});
// Do not change anything here
require('http').createServer((req, res) => res.end(`
|-----------------------------------------|
| Informations |
|-----------------------------------------|
|• Alive: 24/7 |
|-----------------------------------------|
|• Author: Supreme#2401 |
|-----------------------------------------|
|• Server: https://discord.gg/gU7XAxTpX5 |
|-----------------------------------------|
|• Github: https://github.com/diwasatreya |
|-----------------------------------------|
|• License: Apache License 2.0 |
|-----------------------------------------|
`)).listen(3000) //Dont remove this
client.login(token);