From 614642c99d84a579f5af7128c4e39ad44d61f569 Mon Sep 17 00:00:00 2001 From: Klairm <40839469+Klairm@users.noreply.github.com> Date: Sat, 14 Aug 2021 22:43:48 +0200 Subject: [PATCH 1/2] FIX: message is not defined here, have to use interaction --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 511d425..7148b3c 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ client.on("interactionCreate", async (interaction) => { if (!interaction.member.voice.channelId) return await interaction.reply({ content: "You are not in a voice channel!", empheral: true }); 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, { + const queue = player.createQueue(interaction.guild, { metadata: { channel: interaction.channel } From 906aaf8dd44aad20a285da5973124d243c1d08d1 Mon Sep 17 00:00:00 2001 From: Klairm <40839469+Klairm@users.noreply.github.com> Date: Sat, 14 Aug 2021 22:53:35 +0200 Subject: [PATCH 2/2] FIX: defer() should be called deferReply() --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7148b3c..5ce12ee 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ client.on("interactionCreate", async (interaction) => { return await interaction.reply({ content: "Could not join your voice channel!", empheral: true }); } - await interaction.defer(); + await interaction.deferReply(); const track = await player.search(query, { requestedBy: message.author }).then(x => x.tracks[1]);