mirror of
				https://github.com/musix-org/musix-oss
				synced 2025-11-04 06:49:31 +00:00 
			
		
		
		
	@@ -1,4 +1,5 @@
 | 
				
			|||||||
const YouTube = require("simple-youtube-api");
 | 
					const YouTube = require("simple-youtube-api");
 | 
				
			||||||
 | 
					const he = require('he');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module.exports = {
 | 
					module.exports = {
 | 
				
			||||||
	name: 'play',
 | 
						name: 'play',
 | 
				
			||||||
@@ -42,7 +43,7 @@ module.exports = {
 | 
				
			|||||||
					let index = 0;
 | 
										let index = 0;
 | 
				
			||||||
					const embed = new Discord.RichEmbed()
 | 
										const embed = new Discord.RichEmbed()
 | 
				
			||||||
						.setTitle("__Song Selection__")
 | 
											.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.")
 | 
											.setFooter("Please provide a number ranging from 1-10 to select one of the search results.")
 | 
				
			||||||
						.setColor("#b50002")
 | 
											.setColor("#b50002")
 | 
				
			||||||
					message.channel.send(embed);
 | 
										message.channel.send(embed);
 | 
				
			||||||
@@ -54,13 +55,13 @@ module.exports = {
 | 
				
			|||||||
						});
 | 
											});
 | 
				
			||||||
					} catch (err) {
 | 
										} catch (err) {
 | 
				
			||||||
						console.error(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);
 | 
										const videoIndex = parseInt(response.first().content);
 | 
				
			||||||
					var video = await youtube.getVideoByID(videos[videoIndex - 1].id);
 | 
										var video = await youtube.getVideoByID(videos[videoIndex - 1].id);
 | 
				
			||||||
				} catch (err) {
 | 
									} catch (err) {
 | 
				
			||||||
					console.error(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);
 | 
								return client.funcs.handleVideo(video, message, voiceChannel, client, false);
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										18
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										18
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@@ -861,6 +861,14 @@
 | 
				
			|||||||
        "websocket-driver": ">=0.5.1"
 | 
					        "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": {
 | 
					    "firebase": {
 | 
				
			||||||
      "version": "6.6.0",
 | 
					      "version": "6.6.0",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/firebase/-/firebase-6.6.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/firebase/-/firebase-6.6.0.tgz",
 | 
				
			||||||
@@ -1554,6 +1562,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": {
 | 
					    "html-entities": {
 | 
				
			||||||
      "version": "1.2.1",
 | 
					      "version": "1.2.1",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz",
 | 
				
			||||||
@@ -2523,6 +2536,11 @@
 | 
				
			|||||||
      "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz",
 | 
				
			||||||
      "integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q=="
 | 
					      "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": {
 | 
					    "window-size": {
 | 
				
			||||||
      "version": "0.1.4",
 | 
					      "version": "0.1.4",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,9 +14,11 @@
 | 
				
			|||||||
    "dblapi.js": "^2.3.0",
 | 
					    "dblapi.js": "^2.3.0",
 | 
				
			||||||
    "discord.js": "^11.5.1",
 | 
					    "discord.js": "^11.5.1",
 | 
				
			||||||
    "dotenv": "^8.1.0",
 | 
					    "dotenv": "^8.1.0",
 | 
				
			||||||
 | 
					    "ffmpeg": "0.0.4",
 | 
				
			||||||
    "firebase": "^6.6.0",
 | 
					    "firebase": "^6.6.0",
 | 
				
			||||||
    "firebase-admin": "^8.5.0",
 | 
					    "firebase-admin": "^8.5.0",
 | 
				
			||||||
    "fs": "0.0.1-security",
 | 
					    "fs": "0.0.1-security",
 | 
				
			||||||
 | 
					    "he": "^1.2.0",
 | 
				
			||||||
    "ms": "^2.1.1",
 | 
					    "ms": "^2.1.1",
 | 
				
			||||||
    "node-opus": "^0.3.2",
 | 
					    "node-opus": "^0.3.2",
 | 
				
			||||||
    "request": "^2.88.0",
 | 
					    "request": "^2.88.0",
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user