From 183d978c2ceffcb5f875215d42e8fd1b226412f2 Mon Sep 17 00:00:00 2001 From: Snowflake Date: Wed, 2 Dec 2020 12:06:39 +0545 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20use=20validate=20method=20to=20v?= =?UTF-8?q?alidate=20playlist=20url=20(#171)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 📝 use validate method to validate playlist url --- src/Util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Util.js b/src/Util.js index 0a06769..9b348c2 100644 --- a/src/Util.js +++ b/src/Util.js @@ -1,4 +1,4 @@ -const { Util: { PlaylistURLRegex: playlistURLRegex } } = require('youtube-sr') +const ytsr = require('youtube-sr') const soundcloud = require('soundcloud-scraper') const Discord = require('discord.js') @@ -23,7 +23,7 @@ module.exports = class Util { } static isYTPlaylistLink (query) { - return playlistURLRegex.test(query) + return ytsr.default.validate(query, "PLAYLIST") } static isYTVideoLink (query) {