docs: make example clear

This commit is contained in:
DevAndromeda 2021-08-07 20:48:34 +05:45
parent 59b1c60440
commit 949f06c9da
No known key found for this signature in database
GPG key ID: FA40E3EC5CB6DCD6

View file

@ -90,7 +90,7 @@ const { Player } = require("discord-player");
const player = new Player(client);
// add the trackStart event so when a song will be played this message will be sent
player.on("trackStart", (queue, track) => queue.metadata.send(`🎶 | Now playing **${track.title}**!`))
player.on("trackStart", (queue, track) => queue.metadata.channel.send(`🎶 | Now playing **${track.title}**!`))
client.once("ready", () => {
console.log("I'm ready !");
@ -106,7 +106,9 @@ client.on("interactionCreate", async (interaction) => {
if (interaction.guild.me.voice.channelId && interaction.member.voice.channelId !== interaction.guild.me.voice.channelId) return await interaction.reply({ content: "You are not in my voice channel!", empheral: true });
const query = interaction.options.get("query").value;
const queue = player.createQueue(message.guild, {
metadata: interaction.channel
metadata: {
channel: interaction.channel
}
});
// verify vc connection