notvexi
Explore posts from serversDIAdiscord.js - Imagine an app
•Created by notvexi on 10/1/2024 in #djs-questions
Assistance in setting up makeCache and sweepers
Hello, I would like Assistance in setting up makeCache and sweepers.
My problem:
I have a certain amount of cpu/ram usage available to my bot, because that is what my host allows me / what I pay for atm, and the server cpu usage reaches 100% after 1.5 days of my bot being online.
My bot is in 1.3k servers and does basically only music related stuff.
This is my custom client class: https://sourceb.in/nEXUlqZDs5
I use the npm package "status-sharding" for sharding which allows for makeCache etc. since it does not interfere with djs.
I would like to achieve a sweeping cache so that after inactivity, the cache gets cleared for every guild (members, channels, messages etc.) after a certain amount of time.
Also is limiting the cache to 100 messages/channel too much? Do I even need that/other value for that?
I use mainly this in my bot to get stuff:
const guild = bot.guilds.cache.get(id) || (await bot.guilds.fetch(id).catch(() => {}));
same for channel and messages etc.
djs version: 14.16.2
node version: v20.17.015 replies
DIAdiscord.js - Imagine an app
•Created by notvexi on 6/24/2023 in #djs-questions
messageCreate and database issues...
- deleted
16 replies
DIAdiscord.js - Imagine an app
•Created by notvexi on 11/5/2022 in #djs-questions
DiscordAPIError[50035] Invalid Form Body - but WHERE
hello, I am coding a setup command for my discord bot, in which it should create a text channel and setpermissions for itself. now i am getting this error:
djs version: 14.6.0
setup.js code: https://hastebin.com/ovojoyemes.typescript
error trace:
15 replies