-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathspicy-flix.js
57 lines (47 loc) · 1.69 KB
/
spicy-flix.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
56
57
const { Client, GatewayIntentBits, Collection } = require("discord.js");
const process = require('node:process');
class MainClient extends Client {
constructor() {
super({
shards: "auto",
allowedMentions: { parse: ["users", "roles"] },
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildMessageReactions,
]
});
this.config = require("./settings/config.js");
this.owner = this.config.OWNER_ID;
this.spoiler = this.config.SPOILER;
this.support = this.config.SUPPOER;
this.agent = this.config.USERAGENT;
this.invite = this.config.INVITE;
this.logger = this.config.LOGGER;
this.dev = this.config.DEV_ID;
this.color = this.config.EMBED_COLOR;
this.image = this.config.IMAGE;
this.pikped_useragent = this.config.PIKPED_USERAGENT;
this.shards_ready_webhook = this.config.SHARDS_READY_WEBHOOK;
this.er_webhook = this.config.ER_WEBHOOK;
this.main_support = this.config.MAIN_SUPPORT;
this.botlistlog = this.config.BOTLISTLOG;
this.waptap_cookie = this.config.WAPTAP_COOKIE;
if (!this.token) this.token = this.config.TOKEN;
process.on('unhandledRejection', error => console.log(error));
process.on('uncaughtException', error => console.log(error));
const client = this;
["slash", "premiums"].forEach(x => client[x] = new Collection());
["loadCommand", "loadEvent", "loadDatabase", "PremiumReader"].forEach(x => require(`./handlers/${x}`)(client));
}
get id() {
return this.options.shards;
}
get count() {
return this.options.shardCount;
}
connect() {
return super.login(this.token);
};
};
module.exports = MainClient;