mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 22:15:37 +00:00
fix: Moved some utility into categorized folders
This commit is contained in:
1 parent
68ec2f9e97
commit
29ba4ccb50
5 files changed
+6
-6
No files matched your search
@@ -0,0 +1,34 @@
|
||||
const logger = require('../../services/logger');
|
||||
const Discord = require('discord.js');
|
||||
|
||||
exports.createClient = async () => {
|
||||
logger.debug('Creating Discord.js client...');
|
||||
|
||||
const client = new Discord.Client({
|
||||
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
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return client;
|
||||
};
|
||||
Reference in new issue
Block a user