From c6d4e7be0d70b8f6527a14b354f740bf821ba65f Mon Sep 17 00:00:00 2001 From: Minz Date: Tue, 12 Mar 2024 13:30:06 +0100 Subject: [PATCH] Sweep reaction caches every 5 min --- main.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 23bb4ea..cb671a1 100644 --- a/main.js +++ b/main.js @@ -1,9 +1,15 @@ const fs = require('node:fs'); const path = require('node:path'); -const { Client, Collection, Events, GatewayIntentBits } = require('discord.js'); +const { Client, Collection, Events, GatewayIntentBits, Options } = require('discord.js'); const { token } = require('./config.json'); -const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildPresences] }); +const client = new Client({ + intents: [GatewayIntentBits.Guilds, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildPresences], + sweepers: { + ...Options.DefaultSweeperSettings, + reactions: { interval: 300, filter: () => () => { return true } } + } +}); client.commands = new Collection(); const foldersPath = path.join(__dirname, 'commands');