✨ Add new error type
This commit is contained in:
parent
82cc16aaaf
commit
62a56cb856
1 changed files with 1 additions and 0 deletions
|
@ -331,6 +331,7 @@ class Player extends EventEmitter {
|
||||||
trackToPlay = query
|
trackToPlay = query
|
||||||
} else if (this.util.isYTVideoLink(query)) {
|
} else if (this.util.isYTVideoLink(query)) {
|
||||||
const videoData = await ytdl.getBasicInfo(query)
|
const videoData = await ytdl.getBasicInfo(query)
|
||||||
|
if (videoData.videoDetails.isLiveContent) return this.emit('error', 'LiveVideo', message)
|
||||||
const lastThumbnail = videoData.videoDetails.thumbnails.length - 1 /* get the highest quality thumbnail */
|
const lastThumbnail = videoData.videoDetails.thumbnails.length - 1 /* get the highest quality thumbnail */
|
||||||
trackToPlay = new Track({
|
trackToPlay = new Track({
|
||||||
title: videoData.videoDetails.title,
|
title: videoData.videoDetails.title,
|
||||||
|
|
Loading…
Reference in a new issue