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
10 Replies
fair-roseOP•2y ago
The list above is the current Events names.
I would recommend changing it to this new list names:
- debug: unchanged
- nodeClose: unchanged
- nodeCreate: rename to playerCreate
- nodeDestroy: rename to nodeDisconnect
- nodeError: unchanged
- nodeRaw: unchanged
- nodeReconnect: unchanged
- playerDisconnect: unchanged
- playerMove: unchanged
- playerResume: unchanged / no NEED FOR THAT EVENT
- queueEnd: unchanged
- socketClosed: unchanged
- trackEnd: unchanged
- trackError: unchanged
- trackStart: unchanged
- trackStuck: unchanged
quickest-silver•2y ago
why do you want the playerResume event to be removed?
fair-roseOP•2y ago
for what do you need the playerResume event
quickest-silver•2y ago
I don't use it but some people might
GG @Mèmte, you just advanced to level 2!
fair-roseOP•2y ago
give me one usecase for that event other than for logging purposes
quickest-silver•2y ago
If you examine it, you can easily see that this event also occurs in other lavalink providers. an event opened in case they want to bring this event
we don't know how people will create something, it's up to their imagination, for example, when the player resume, they may want to have a situation checked etc.
Just because we do not use it, it cannot be expected that other users will not use it.
correct-apricot•2y ago
i think i could change the event from playerResume to playerCreate that way I see utility for the event below is my playerCreate event in Erela.js
correct-apricot•2y ago
the nodeCreate event sees no use in modifying it to playerCreate since it runs when a new lavalink Node is created and not when a player is created in my view it's meant to be that I'm not using Moonlink.js in my bot to be able to say that
quickest-silver•2y ago
hmm that makes sense