3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Limit cache size

This commit is contained in:
Dragory 2021-10-04 19:27:00 +03:00
parent 58e69a19a3
commit cb53061256
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -1,4 +1,4 @@
import { Client, Constants, Intents, TextChannel, ThreadChannel } from "discord.js";
import { Client, Constants, Intents, Options, TextChannel, ThreadChannel } from "discord.js";
import { Knub, PluginError } from "knub";
import { PluginLoadError } from "knub/dist/plugins/PluginLoadError";
// Always use UTC internally
@ -176,6 +176,14 @@ connect().then(async () => {
const client = new Client({
partials: ["USER", "CHANNEL", "GUILD_MEMBER", "MESSAGE", "REACTION"],
makeCache: Options.cacheWithLimits({
...Options.defaultMakeCacheSettings,
MessageManager: 0,
GuildMemberManager: 5000,
BaseGuildEmojiManager: 1000,
GuildInviteManager: 0,
}),
restGlobalRateLimit: 50,
// restTimeOffset: 1000,