diff --git a/src/index.js b/src/index.js index 7901d18..851d5ef 100644 --- a/src/index.js +++ b/src/index.js @@ -8,7 +8,29 @@ require('dotenv').config(); // Setup required permissions for the bot to work const client = new Discord.Client({ - intents: [Discord.GatewayIntentBits.Guilds, Discord.GatewayIntentBits.GuildVoiceStates] + intents: [Discord.GatewayIntentBits.Guilds, Discord.GatewayIntentBits.GuildVoiceStates], + makeCache: Discord.Options.cacheWithLimits({ + ...Discord.Options.DefaultMakeCacheSettings, + MessageManager: 25, + ThreadManager: 25, + PresenceManager: 0, + ReactionManager: 0, + GuildMemberManager: { + maxSize: 50, + keepOverLimit: (member) => member.id === client.user.id + } + }), + sweepers: { + ...Discord.Options.DefaultSweeperSettings, + messages: { + interval: 3600, + lifetime: 1800 + }, + users: { + interval: 3600, + filter: () => (user) => user.id !== client.user.id + } + } }); const player = new Player(client, {