From 1145d92556dda9842356f831406253a713fd5845 Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Fri, 11 Oct 2019 20:50:49 +0300 Subject: [PATCH 1/5] Update play.js --- commands/play.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/play.js b/commands/play.js index 226a298e..2586f3c7 100644 --- a/commands/play.js +++ b/commands/play.js @@ -54,13 +54,13 @@ module.exports = { }); } catch (err) { console.error(err); - return message.channel.send(':x: Cancelling video selection or no results.'); + return message.channel.send(':x: Cancelling video selection'); } const videoIndex = parseInt(response.first().content); var video = await youtube.getVideoByID(videos[videoIndex - 1].id); } catch (err) { console.error(err); - return message.channel.send(':x: Cancelling video selection or no results'); + return message.channel.send(':x: I could not obtain any search results!'); } } return client.funcs.handleVideo(video, message, voiceChannel, client, false); From ffbdc173f69bd8c516a1e9286736c7750552bc04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Fri, 11 Oct 2019 21:02:37 +0300 Subject: [PATCH 2/5] Update play.js --- commands/play.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/play.js b/commands/play.js index 226a298e..c9253e16 100644 --- a/commands/play.js +++ b/commands/play.js @@ -1,4 +1,5 @@ const YouTube = require("simple-youtube-api"); +const he = require('he'); module.exports = { name: 'play', @@ -42,7 +43,7 @@ module.exports = { let index = 0; const embed = new Discord.RichEmbed() .setTitle("__Song Selection__") - .setDescription(`${videos.map(video2 => `**${++index}** ${video2.title} `).join('\n')}`) + .setDescription(`${videos.map(video2 => `**${++index}** ${he.decode(video2.title)} `).join('\n')}`) .setFooter("Please provide a number ranging from 1-10 to select one of the search results.") .setColor("#b50002") message.channel.send(embed); @@ -66,4 +67,4 @@ module.exports = { return client.funcs.handleVideo(video, message, voiceChannel, client, false); } } -}; \ No newline at end of file +}; From a271bbe8f8e4b18e3b41a51bb72b146d7c10b444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Fri, 11 Oct 2019 21:03:57 +0300 Subject: [PATCH 3/5] Adding he to dependencies in package.json --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 96670b7a..5cc56a3f 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "node-opus": "^0.3.2", "request": "^2.88.0", "simple-youtube-api": "^5.2.1", - "ytdl-core": "^0.29.7" + "ytdl-core": "^0.29.7", + "he": "^1.2.0" } } From 0794bbf3e5c2f30ecb79487a3af03c66bb63d4c3 Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Fri, 11 Oct 2019 21:43:29 +0300 Subject: [PATCH 4/5] Update package-lock.json --- package-lock.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package-lock.json b/package-lock.json index cd3815ab..449d74e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1554,6 +1554,11 @@ } } }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" + }, "html-entities": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", From db12d61eae403008973e63edad4532c29e36ca98 Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Fri, 11 Oct 2019 21:50:31 +0300 Subject: [PATCH 5/5] added ffmpeg --- package-lock.json | 13 +++++++++++++ package.json | 5 +++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 449d74e0..a234e97f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -861,6 +861,14 @@ "websocket-driver": ">=0.5.1" } }, + "ffmpeg": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/ffmpeg/-/ffmpeg-0.0.4.tgz", + "integrity": "sha1-HEYN+OfaUSf2LO70v6BsWciWMMs=", + "requires": { + "when": ">= 0.0.1" + } + }, "firebase": { "version": "6.6.0", "resolved": "https://registry.npmjs.org/firebase/-/firebase-6.6.0.tgz", @@ -2528,6 +2536,11 @@ "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz", "integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==" }, + "when": { + "version": "3.7.8", + "resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz", + "integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I=" + }, "window-size": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", diff --git a/package.json b/package.json index 5cc56a3f..189e2311 100644 --- a/package.json +++ b/package.json @@ -14,14 +14,15 @@ "dblapi.js": "^2.3.0", "discord.js": "^11.5.1", "dotenv": "^8.1.0", + "ffmpeg": "0.0.4", "firebase": "^6.6.0", "firebase-admin": "^8.5.0", "fs": "0.0.1-security", + "he": "^1.2.0", "ms": "^2.1.1", "node-opus": "^0.3.2", "request": "^2.88.0", "simple-youtube-api": "^5.2.1", - "ytdl-core": "^0.29.7", - "he": "^1.2.0" + "ytdl-core": "^0.29.7" } }