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
MIA🎶 Moonlink.js - Imagine a Music Application
Created by like-gold on 7/14/2023 in #suggestion
Add event for playerCreation
Hello, I would kindly appreciate an implementation of an event called playerCreate, which gets emitted everytime a player gets created. It takes MoonlinkPlayer as an argument
1 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by national-gold on 7/14/2023 in #help
Music is only playing if the loadType is search.. everything else is not working
This is my code atm: https://sourceb.in/OT8OoiXZF1
4 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by variable-lime on 7/13/2023 in #help
res.tracks[0] is *null*
Hello, I am encountering this issue right now: If i search a song using the title and author, i get an array of tracks from my search result. However if I search something using a spotify track link, I get loadType "track" and res.tracks[0] is null
10 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by inland-turquoise on 7/13/2023 in #suggestion
Rename all the events to its proper functionality
I would like to recommend the renaming of some events... - debug: Emits debug messages for debugging purposes. Takes any number of arguments. - nodeClose: Fired when a connection to a Lavalink node is closed. Takes the node object, code, and reason as arguments. - nodeCreate: Fired when a connection to a Lavalink node is successfully created. Takes the node object as an argument. - nodeDestroy: Fired when a connection to a Lavalink node is destroyed. Takes the node object as an argument. - nodeError: Fired when an error occurs with a Lavalink node. Takes the node object and the error object as arguments. - nodeRaw: Fired when a raw payload is received from a Lavalink node. Takes the node object and the payload object as arguments. - nodeReconnect: Fired when a connection to a Lavalink node is successfully reconnected. Takes the node object as an argument. - playerDisconnect: Fired when a player is disconnected from a voice channel. Takes the player object as an argument. - playerMove: Fired when a player is moved to a different voice channel. Takes the player object, the new voice channel ID, and the old voice channel ID as arguments. - playerResume: Fired when a player is resumed from a paused state. Takes the player object as an argument. - queueEnd: Fired when the queue of a player ends. Takes the player object and the last track as arguments. - socketClosed: Fired when the WebSocket connection of a player is closed. Takes the player object and the payload as arguments. - trackEnd: Fired when a track ends. Takes the player object, the track object, and the payload as arguments. - trackError: Fired when there is an error with a track. Takes the player object and the track object as arguments. - trackStart: Fired when a track starts playing. Takes the player object and the current track object as arguments. - trackStuck: Fired when a track gets stuck. Takes the player object and the current track object as
14 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by multiple-amethyst on 7/13/2023 in #suggestion
Remove playerResume event
There is really NO need for this event. The player gets resumed / paused by userInput etc. NO NEED TO HAVE THIS EVENT IN THE FIRST PLACE
6 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by ratty-blush on 7/13/2023 in #suggestion
Allow player.destroy() to take a boolean as parameter
Hello, I would love to have the option to call something like this: player.destroy(false) and have the player destroyed, but the bot does not disconnect from the voice channel.. To achieve that I modified the destroy() method in the "MoonlinkPlayers.ts" file to this exact one here:
public async destroy(disconnect: boolean = true): Promise<boolean> {
if (typeof disconnect !== 'boolean') {
throw new Error('[ @Moonlink/Player ]: The parameter must be a boolean value');
}

if (disconnect && this.connected) {
this.disconnect();
}

if ((this.rest.node.version as string).replace(/\./g, '') <= '374') {
this.sendWs({
op: 'destroy',
guildId: this.guildId,
});
} else {
await this.rest.destroy(this.guildId);
}

this.queue.db.delete(`queue.${this.guildId}`);
let players = this.map.get('players');
delete players[this.guildId];
this.map.set('players', players);
return true;
}
public async destroy(disconnect: boolean = true): Promise<boolean> {
if (typeof disconnect !== 'boolean') {
throw new Error('[ @Moonlink/Player ]: The parameter must be a boolean value');
}

if (disconnect && this.connected) {
this.disconnect();
}

if ((this.rest.node.version as string).replace(/\./g, '') <= '374') {
this.sendWs({
op: 'destroy',
guildId: this.guildId,
});
} else {
await this.rest.destroy(this.guildId);
}

this.queue.db.delete(`queue.${this.guildId}`);
let players = this.map.get('players');
delete players[this.guildId];
this.map.set('players', players);
return true;
}
1 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by continuing-cyan on 7/12/2023 in #help
[ @Moonlink ]: Dear programmer, from new versions of moonlink.js it will only support versions above
I downloded and replaced my Lavalink.jar and I still get this error... I downloaded it from https://github.com/lavalink-devs/Lavalink/releases/tag/4.0.0-beta.1
6 replies
DIAdiscord.js - Imagine an app
Created by notvexi on 6/24/2023 in #djs-questions
messageCreate and database issues...
- deleted
16 replies
MIA🎶 Moonlink.js - Imagine a Music Application
Created by equal-aqua on 4/25/2023 in #help
How hard is it to upgrade from erela.js to here?
Hello, how hard is it to upgrade from erela.js to here? Since erela.js is not being mantained anymor
63 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