-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
45 lines (44 loc) · 1.46 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
const Discord = require("discord.js-light");
require("dotenv").config();
const client = new Discord.Client({
makeCache: Discord.Options.cacheWithLimits({
ApplicationCommandManager: Infinity, // guild.commands
BaseGuildEmojiManager: Infinity, // guild.emojis
ChannelManager: Infinity, // client.channels
GuildChannelManager: Infinity, // guild.channels
GuildBanManager: Infinity, // guild.bans
GuildManager: Infinity, // client.guilds
GuildMemberManager: Infinity, // guild.members
MessageManager: Infinity, // channel.messages
PermissionOverwriteManager: Infinity, // channel.permissionOverwrites
RoleManager: Infinity, // guild.roles
UserManager: Infinity, // client.users
}),
intents: [
Discord.Intents.FLAGS.GUILDS,
"GUILD_MESSAGES",
"GUILD_MEMBERS",
"GUILD_BANS",
"GUILDS",
"GUILD_EMOJIS_AND_STICKERS",
"GUILD_INVITES",
"GUILD_WEBHOOKS",
"GUILD_INTEGRATIONS",
"GUILD_VOICE_STATES",
"DIRECT_MESSAGES",
"DIRECT_MESSAGE_TYPING",
],
rejectOnRateLimit: () => true,
shards: "auto",
messageCacheLifetime: 180,
messageCacheMaxSize: 50,
});
module.exports = client;
client.commands = new Discord.Collection();
client.slash = new Discord.Collection();
["cmds", "eventos", "slash"].forEach((handler) => {
require(`./Handlers/${handler}`)(client);
});
client
.login(process.env.TOKEN)
.then((m) => console.log(`Iniciado como ${client.user.tag}`));