📝 use validate method to validate playlist url (#171)
📝 use validate method to validate playlist url
This commit is contained in:
parent
9e2f0acdc2
commit
183d978c2c
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
const { Util: { PlaylistURLRegex: playlistURLRegex } } = require('youtube-sr')
|
const ytsr = require('youtube-sr')
|
||||||
const soundcloud = require('soundcloud-scraper')
|
const soundcloud = require('soundcloud-scraper')
|
||||||
const Discord = require('discord.js')
|
const Discord = require('discord.js')
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ module.exports = class Util {
|
||||||
}
|
}
|
||||||
|
|
||||||
static isYTPlaylistLink (query) {
|
static isYTPlaylistLink (query) {
|
||||||
return playlistURLRegex.test(query)
|
return ytsr.default.validate(query, "PLAYLIST")
|
||||||
}
|
}
|
||||||
|
|
||||||
static isYTVideoLink (query) {
|
static isYTVideoLink (query) {
|
||||||
|
|
Loading…
Reference in a new issue