1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-23 03:33:17 +00:00

Merge pull request #8 from cwchristerw/fix-7

HTML decoding titles in Song Selection
This commit is contained in:
Matte 2019-10-11 21:13:03 +03:00 committed by GitHub
commit e19dd1676e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -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);

View File

@ -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"
}
}