Merge branch 'develop' of https://github.com/Androz2091/discord-player into develop
This commit is contained in:
commit
3a6d49c34b
2 changed files with 57 additions and 23 deletions
10
README.md
10
README.md
|
@ -102,8 +102,8 @@ client.on("interactionCreate", async (interaction) => {
|
||||||
// /play Despacito
|
// /play Despacito
|
||||||
// will play "Despacito" in the voice channel
|
// will play "Despacito" in the voice channel
|
||||||
if (interaction.commandName === "play") {
|
if (interaction.commandName === "play") {
|
||||||
if (!interaction.member.voice.channelId) return await interaction.reply({ content: "You are not in a voice channel!", empheral: true });
|
if (!interaction.member.voice.channelId) return await interaction.reply({ content: "You are not in a voice channel!", ephemeral: 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 });
|
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!", ephemeral: true });
|
||||||
const query = interaction.options.get("query").value;
|
const query = interaction.options.get("query").value;
|
||||||
const queue = player.createQueue(interaction.guild, {
|
const queue = player.createQueue(interaction.guild, {
|
||||||
metadata: {
|
metadata: {
|
||||||
|
@ -116,13 +116,13 @@ client.on("interactionCreate", async (interaction) => {
|
||||||
if (!queue.connection) await queue.connect(interaction.member.voice.channel);
|
if (!queue.connection) await queue.connect(interaction.member.voice.channel);
|
||||||
} catch {
|
} catch {
|
||||||
queue.destroy();
|
queue.destroy();
|
||||||
return await interaction.reply({ content: "Could not join your voice channel!", empheral: true });
|
return await interaction.reply({ content: "Could not join your voice channel!", ephemeral: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
await interaction.deferReply();
|
await interaction.deferReply();
|
||||||
const track = await player.search(query, {
|
const track = await player.search(query, {
|
||||||
requestedBy: message.author
|
requestedBy: interaction.user
|
||||||
}).then(x => x.tracks[1]);
|
}).then(x => x.tracks[0]);
|
||||||
if (!track) return await interaction.followUp({ content: `❌ | Track **${query}** not found!` });
|
if (!track) return await interaction.followUp({ content: `❌ | Track **${query}** not found!` });
|
||||||
|
|
||||||
queue.play(track);
|
queue.play(track);
|
||||||
|
|
70
yarn.lock
70
yarn.lock
|
@ -1137,38 +1137,38 @@
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
"@typescript-eslint/eslint-plugin@^4.29.1":
|
"@typescript-eslint/eslint-plugin@^4.29.1":
|
||||||
version "4.29.1"
|
version "4.29.2"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.1.tgz#808d206e2278e809292b5de752a91105da85860b"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.2.tgz#f54dc0a32b8f61c6024ab8755da05363b733838d"
|
||||||
integrity sha512-AHqIU+SqZZgBEiWOrtN94ldR3ZUABV5dUG94j8Nms9rQnHFc8fvDOue/58K4CFz6r8OtDDc35Pw9NQPWo0Ayrw==
|
integrity sha512-x4EMgn4BTfVd9+Z+r+6rmWxoAzBaapt4QFqE+d8L8sUtYZYLDTK6VG/y/SMMWA5t1/BVU5Kf+20rX4PtWzUYZg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/experimental-utils" "4.29.1"
|
"@typescript-eslint/experimental-utils" "4.29.2"
|
||||||
"@typescript-eslint/scope-manager" "4.29.1"
|
"@typescript-eslint/scope-manager" "4.29.2"
|
||||||
debug "^4.3.1"
|
debug "^4.3.1"
|
||||||
functional-red-black-tree "^1.0.1"
|
functional-red-black-tree "^1.0.1"
|
||||||
regexpp "^3.1.0"
|
regexpp "^3.1.0"
|
||||||
semver "^7.3.5"
|
semver "^7.3.5"
|
||||||
tsutils "^3.21.0"
|
tsutils "^3.21.0"
|
||||||
|
|
||||||
"@typescript-eslint/experimental-utils@4.29.1":
|
"@typescript-eslint/experimental-utils@4.29.2":
|
||||||
version "4.29.1"
|
version "4.29.2"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.29.1.tgz#0af2b17b0296b60c6b207f11062119fa9c5a8994"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.29.2.tgz#5f67fb5c5757ef2cb3be64817468ba35c9d4e3b7"
|
||||||
integrity sha512-kl6QG6qpzZthfd2bzPNSJB2YcZpNOrP6r9jueXupcZHnL74WiuSjaft7WSu17J9+ae9zTlk0KJMXPUj0daBxMw==
|
integrity sha512-P6mn4pqObhftBBPAv4GQtEK7Yos1fz/MlpT7+YjH9fTxZcALbiiPKuSIfYP/j13CeOjfq8/fr9Thr2glM9ub7A==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/json-schema" "^7.0.7"
|
"@types/json-schema" "^7.0.7"
|
||||||
"@typescript-eslint/scope-manager" "4.29.1"
|
"@typescript-eslint/scope-manager" "4.29.2"
|
||||||
"@typescript-eslint/types" "4.29.1"
|
"@typescript-eslint/types" "4.29.2"
|
||||||
"@typescript-eslint/typescript-estree" "4.29.1"
|
"@typescript-eslint/typescript-estree" "4.29.2"
|
||||||
eslint-scope "^5.1.1"
|
eslint-scope "^5.1.1"
|
||||||
eslint-utils "^3.0.0"
|
eslint-utils "^3.0.0"
|
||||||
|
|
||||||
"@typescript-eslint/parser@^4.29.1":
|
"@typescript-eslint/parser@^4.29.1":
|
||||||
version "4.29.1"
|
version "4.29.2"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.29.1.tgz#17dfbb45c9032ffa0fe15881d20fbc2a4bdeb02d"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.29.2.tgz#1c7744f4c27aeb74610c955d3dce9250e95c370a"
|
||||||
integrity sha512-3fL5iN20hzX3Q4OkG7QEPFjZV2qsVGiDhEwwh+EkmE/w7oteiOvUNzmpu5eSwGJX/anCryONltJ3WDmAzAoCMg==
|
integrity sha512-WQ6BPf+lNuwteUuyk1jD/aHKqMQ9jrdCn7Gxt9vvBnzbpj7aWEf+aZsJ1zvTjx5zFxGCt000lsbD9tQPEL8u6g==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/scope-manager" "4.29.1"
|
"@typescript-eslint/scope-manager" "4.29.2"
|
||||||
"@typescript-eslint/types" "4.29.1"
|
"@typescript-eslint/types" "4.29.2"
|
||||||
"@typescript-eslint/typescript-estree" "4.29.1"
|
"@typescript-eslint/typescript-estree" "4.29.2"
|
||||||
debug "^4.3.1"
|
debug "^4.3.1"
|
||||||
|
|
||||||
"@typescript-eslint/scope-manager@4.29.1":
|
"@typescript-eslint/scope-manager@4.29.1":
|
||||||
|
@ -1179,11 +1179,24 @@
|
||||||
"@typescript-eslint/types" "4.29.1"
|
"@typescript-eslint/types" "4.29.1"
|
||||||
"@typescript-eslint/visitor-keys" "4.29.1"
|
"@typescript-eslint/visitor-keys" "4.29.1"
|
||||||
|
|
||||||
|
"@typescript-eslint/scope-manager@4.29.2":
|
||||||
|
version "4.29.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.29.2.tgz#442b0f029d981fa402942715b1718ac7fcd5aa1b"
|
||||||
|
integrity sha512-mfHmvlQxmfkU8D55CkZO2sQOueTxLqGvzV+mG6S/6fIunDiD2ouwsAoiYCZYDDK73QCibYjIZmGhpvKwAB5BOA==
|
||||||
|
dependencies:
|
||||||
|
"@typescript-eslint/types" "4.29.2"
|
||||||
|
"@typescript-eslint/visitor-keys" "4.29.2"
|
||||||
|
|
||||||
"@typescript-eslint/types@4.29.1":
|
"@typescript-eslint/types@4.29.1":
|
||||||
version "4.29.1"
|
version "4.29.1"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.29.1.tgz#94cce6cf7cc83451df03339cda99d326be2feaf5"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.29.1.tgz#94cce6cf7cc83451df03339cda99d326be2feaf5"
|
||||||
integrity sha512-Jj2yu78IRfw4nlaLtKjVaGaxh/6FhofmQ/j8v3NXmAiKafbIqtAPnKYrf0sbGjKdj0hS316J8WhnGnErbJ4RCA==
|
integrity sha512-Jj2yu78IRfw4nlaLtKjVaGaxh/6FhofmQ/j8v3NXmAiKafbIqtAPnKYrf0sbGjKdj0hS316J8WhnGnErbJ4RCA==
|
||||||
|
|
||||||
|
"@typescript-eslint/types@4.29.2":
|
||||||
|
version "4.29.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.29.2.tgz#fc0489c6b89773f99109fb0aa0aaddff21f52fcd"
|
||||||
|
integrity sha512-K6ApnEXId+WTGxqnda8z4LhNMa/pZmbTFkDxEBLQAbhLZL50DjeY0VIDCml/0Y3FlcbqXZrABqrcKxq+n0LwzQ==
|
||||||
|
|
||||||
"@typescript-eslint/typescript-estree@4.29.1":
|
"@typescript-eslint/typescript-estree@4.29.1":
|
||||||
version "4.29.1"
|
version "4.29.1"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.1.tgz#7b32a25ff8e51f2671ccc6b26cdbee3b1e6c5e7f"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.1.tgz#7b32a25ff8e51f2671ccc6b26cdbee3b1e6c5e7f"
|
||||||
|
@ -1197,6 +1210,19 @@
|
||||||
semver "^7.3.5"
|
semver "^7.3.5"
|
||||||
tsutils "^3.21.0"
|
tsutils "^3.21.0"
|
||||||
|
|
||||||
|
"@typescript-eslint/typescript-estree@4.29.2":
|
||||||
|
version "4.29.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.2.tgz#a0ea8b98b274adbb2577100ba545ddf8bf7dc219"
|
||||||
|
integrity sha512-TJ0/hEnYxapYn9SGn3dCnETO0r+MjaxtlWZ2xU+EvytF0g4CqTpZL48SqSNn2hXsPolnewF30pdzR9a5Lj3DNg==
|
||||||
|
dependencies:
|
||||||
|
"@typescript-eslint/types" "4.29.2"
|
||||||
|
"@typescript-eslint/visitor-keys" "4.29.2"
|
||||||
|
debug "^4.3.1"
|
||||||
|
globby "^11.0.3"
|
||||||
|
is-glob "^4.0.1"
|
||||||
|
semver "^7.3.5"
|
||||||
|
tsutils "^3.21.0"
|
||||||
|
|
||||||
"@typescript-eslint/visitor-keys@4.29.1":
|
"@typescript-eslint/visitor-keys@4.29.1":
|
||||||
version "4.29.1"
|
version "4.29.1"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.1.tgz#0615be8b55721f5e854f3ee99f1a714f2d093e5d"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.1.tgz#0615be8b55721f5e854f3ee99f1a714f2d093e5d"
|
||||||
|
@ -1205,6 +1231,14 @@
|
||||||
"@typescript-eslint/types" "4.29.1"
|
"@typescript-eslint/types" "4.29.1"
|
||||||
eslint-visitor-keys "^2.0.0"
|
eslint-visitor-keys "^2.0.0"
|
||||||
|
|
||||||
|
"@typescript-eslint/visitor-keys@4.29.2":
|
||||||
|
version "4.29.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.2.tgz#d2da7341f3519486f50655159f4e5ecdcb2cd1df"
|
||||||
|
integrity sha512-bDgJLQ86oWHJoZ1ai4TZdgXzJxsea3Ee9u9wsTAvjChdj2WLcVsgWYAPeY7RQMn16tKrlQaBnpKv7KBfs4EQag==
|
||||||
|
dependencies:
|
||||||
|
"@typescript-eslint/types" "4.29.2"
|
||||||
|
eslint-visitor-keys "^2.0.0"
|
||||||
|
|
||||||
abab@^2.0.3, abab@^2.0.5:
|
abab@^2.0.3, abab@^2.0.5:
|
||||||
version "2.0.5"
|
version "2.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a"
|
resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a"
|
||||||
|
|
Loading…
Reference in a new issue