-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.js
49 lines (45 loc) · 1.29 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
const { token } = require('dotenv').config().parsed;
const { Client, GatewayIntentBits, ActivityType, Partials, Options, Collection } = require('discord.js');
class Bot extends Client {
constructor() {
super({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
],
presence: {
activities: [{
type: ActivityType.Custom,
name: 'customstatus',
state: '🔒 Locks',
}],
status: 'dnd',
},
makeCache: Options.cacheWithLimits({
...Options.DefaultMakeCacheSettings,
ReactionManager: 0,
GuildMemberManager: {
maxSize: 200,
keepOverLimit: member => member.id === member.client.user.id,
},
}),
sweepers: {
...Options.DefaultSweeperSettings,
messages: {
interval: 3_600,
lifetime: 1_800,
},
users: {
interval: 3_600,
filter: () => user => user.bot && user.id !== user.client.user.id,
},
},
partials: [Partials.Channel, Partials.GuildMember, Partials.User],
});
this.commands = new Collection();
this.config = require('./src/config/config');
require('./src/handler/index')(this);
}
}
const client = new Bot();
client.login(token);