can someone help me with so high ram usage

can someone help me my bot is taking 29gb of ram its in 85 k servers when bot got started it only take 8gb ram then slowly it's increases the ram size after some duration this is my client
import { ClientOptions, GatewayIntentBits,Options , LimitedCollection, Collection } from 'discord.js';
import { ClusterClient, getInfo } from 'discord-hybrid-sharding'

import config from './config.js';
import Muzoxbot from './structures/Muzoxbot.js';

const clientOptions: ClientOptions = {
intents: [
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.Guilds,
GatewayIntentBits.MessageContent,
],
shards: getInfo().SHARD_LIST, // An array of shards that will get spawned
shardCount: getInfo().TOTAL_SHARDS,
allowedMentions: { parse: ['users', 'roles'], repliedUser: false },
};
const client = new Muzoxbot(clientOptions);
client.on('disconnect', (event) => {
console.log(`Bot disconnected with code ${event.code}. Trying to reconnect...`);
});
client.on('reconnecting', () => {
console.log('Reconnecting...');
});
client.start(config.token).catch((error) => {
console.error('Error:', error);
});
import { ClientOptions, GatewayIntentBits,Options , LimitedCollection, Collection } from 'discord.js';
import { ClusterClient, getInfo } from 'discord-hybrid-sharding'

import config from './config.js';
import Muzoxbot from './structures/Muzoxbot.js';

const clientOptions: ClientOptions = {
intents: [
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.Guilds,
GatewayIntentBits.MessageContent,
],
shards: getInfo().SHARD_LIST, // An array of shards that will get spawned
shardCount: getInfo().TOTAL_SHARDS,
allowedMentions: { parse: ['users', 'roles'], repliedUser: false },
};
const client = new Muzoxbot(clientOptions);
client.on('disconnect', (event) => {
console.log(`Bot disconnected with code ${event.code}. Trying to reconnect...`);
});
client.on('reconnecting', () => {
console.log('Reconnecting...');
});
client.start(config.token).catch((error) => {
console.error('Error:', error);
});
3 Replies
d.js toolkit
d.js toolkit13mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
shadowbringer
shadowbringer13mo ago
use pnpm
Harnes
Harnes13mo ago
Package manager has nothing to do with ram usage ig
Want results from more Discord servers?
Add your server