Documentation
Classes
discord-player
QueryResolver

QueryResolver

new QueryResolver()

Properties

public regex: { appleMusicAlbumRegex: RegExp,appleMusicPlaylistRegex: RegExp,appleMusicSongRegex: RegExp,attachmentRegex: RegExp,reverbnationRegex: RegExp,spotifyAlbumRegex: RegExp,spotifyPlaylistRegex: RegExp,spotifySongRegex: RegExp,vimeoRegex: RegExp }

Methods

public static getVimeoID(query): undefined | null | string

Parses vimeo id from url

ParameterTypeOptionalDescription
querystringThe query

public static resolve(query): 'auto' | 'youtube' | 'youtubePlaylist' | 'soundcloudTrack' | 'soundcloudPlaylist' | 'soundcloud' | 'spotifySong' | 'spotifyAlbum' | 'spotifyPlaylist' | 'facebook' | 'vimeo' | 'arbitrary' | 'reverbnation' | 'youtubeSearch' | 'youtubeVideo' | 'soundcloudSearch' | 'appleMusicSong' | 'appleMusicAlbum' | 'appleMusicPlaylist' | 'appleMusicSearch' | 'file'

Resolves the given search query

ParameterTypeOptionalDescription
querystringThe query

public static validateId(q): boolean

ParameterTypeOptionalDescription
qstring-

public static validateURL(q): boolean

ParameterTypeOptionalDescription
qstring-