Vish
Vish
DIAdiscord.js - Imagine an app
Created by Vish on 7/3/2024 in #djs-questions
Cannot read properties of undefined (reading 'reduce')
my bot suddenly start giving this error pls help
13 replies
DIAdiscord.js - Imagine an app
Created by Vish on 12/2/2023 in #djs-questions
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);
});
4 replies