diff --git a/backend/src/index.ts b/backend/src/index.ts index f360be4b..142e3a07 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -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,