notvexi
notvexi
Explore posts from servers
DIAdiscord.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.0
15 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:
js[02:07:59]: ERROR running slashCreate: 709832515577184287 | DiscordAPIError[50035]: Invalid Form Body
name[BASE_TYPE_REQUIRED]: This field is required
js[02:07:59]: ERROR running slashCreate: 709832515577184287 | DiscordAPIError[50035]: Invalid Form Body
name[BASE_TYPE_REQUIRED]: This field is required
djs version: 14.6.0 setup.js code: https://hastebin.com/ovojoyemes.typescript error trace:
Trace: DiscordAPIError[50035]: Invalid Form Body
name[BASE_TYPE_REQUIRED]: This field is required
at SequentialHandler.runRequest (D:\Bots\Discord Bots\Lunio\Lunio 2\node_modules\discord.js\node_modules\@discordjs\rest\dist\index.js:659:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.queueRequest (D:\Bots\Discord Bots\Lunio\Lunio 2\node_modules\discord.js\node_modules\@discordjs\rest\dist\index.js:458:14)
at async REST.request (D:\Bots\Discord Bots\Lunio\Lunio 2\node_modules\discord.js\node_modules\@discordjs\rest\dist\index.js:902:22)
at async GuildChannelManager.create (D:\Bots\Discord Bots\Lunio\Lunio 2\node_modules\discord.js\src\managers\GuildChannelManager.js:151:18)
at async Setup.callback (D:\Bots\Discord Bots\Lunio\Lunio 2\src\commands\Admin\setup.js:89:28)
at async slashCreate.run (D:\Bots\Discord Bots\Lunio\Lunio 2\src\events\custom\slashCreate.js:355:4) {
requestBody: {
files: undefined,
json: {
name: undefined,
topic: undefined,
type: undefined,
nsfw: undefined,
bitrate: undefined,
user_limit: undefined,
parent_id: undefined,
position: undefined,
permission_overwrites: undefined,
rate_limit_per_user: undefined,
rtc_region: undefined,
video_quality_mode: undefined,
available_tags: undefined,
default_reaction_emoji: undefined,
default_auto_archive_duration: undefined,
default_sort_order: undefined
}
},
rawError: {
code: 50035,
errors: { name: [Object] },
message: 'Invalid Form Body'
},
code: 50035,
status: 400,
method: 'POST',
url: 'https://discord.com/api/v10/guilds/709832515577184287/channels'
}
at slashCreate.run (D:\Bots\Discord Bots\Lunio\Lunio 2\src\events\custom\slashCreate.js:357:12)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Trace: DiscordAPIError[50035]: Invalid Form Body
name[BASE_TYPE_REQUIRED]: This field is required
at SequentialHandler.runRequest (D:\Bots\Discord Bots\Lunio\Lunio 2\node_modules\discord.js\node_modules\@discordjs\rest\dist\index.js:659:15)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async SequentialHandler.queueRequest (D:\Bots\Discord Bots\Lunio\Lunio 2\node_modules\discord.js\node_modules\@discordjs\rest\dist\index.js:458:14)
at async REST.request (D:\Bots\Discord Bots\Lunio\Lunio 2\node_modules\discord.js\node_modules\@discordjs\rest\dist\index.js:902:22)
at async GuildChannelManager.create (D:\Bots\Discord Bots\Lunio\Lunio 2\node_modules\discord.js\src\managers\GuildChannelManager.js:151:18)
at async Setup.callback (D:\Bots\Discord Bots\Lunio\Lunio 2\src\commands\Admin\setup.js:89:28)
at async slashCreate.run (D:\Bots\Discord Bots\Lunio\Lunio 2\src\events\custom\slashCreate.js:355:4) {
requestBody: {
files: undefined,
json: {
name: undefined,
topic: undefined,
type: undefined,
nsfw: undefined,
bitrate: undefined,
user_limit: undefined,
parent_id: undefined,
position: undefined,
permission_overwrites: undefined,
rate_limit_per_user: undefined,
rtc_region: undefined,
video_quality_mode: undefined,
available_tags: undefined,
default_reaction_emoji: undefined,
default_auto_archive_duration: undefined,
default_sort_order: undefined
}
},
rawError: {
code: 50035,
errors: { name: [Object] },
message: 'Invalid Form Body'
},
code: 50035,
status: 400,
method: 'POST',
url: 'https://discord.com/api/v10/guilds/709832515577184287/channels'
}
at slashCreate.run (D:\Bots\Discord Bots\Lunio\Lunio 2\src\events\custom\slashCreate.js:357:12)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
15 replies
VVALORANT
Created by notvexi on 10/24/2022 in #community-help
Is there a way to copy config files like league of legends?
Hello, I was wondering if it is possible to copy config files to another account. Like league of legends. For league of legends I just check a box in my explorer which says "read only" and then when I start league with my 2nd account all my settings from my main are there. Is it possible for VALORANT?
5 replies