Common actions
Adding events to your bot
Learn how to add discord-player events to your bot
Player state changes get emitted as events. You can attach to a particular listener to keep track of them.
The most commonly used listeners and their sample implementation are listed below:
Add these in your index.js
where you initialized the Discord Player instance
General events
queue.metadata.send()
is used here to send a message to the interaction channel.
For this example to work, you will need to pass interaction.channel
as the metadata while executing the play
command. Check the example below