jsdoc
This commit is contained in:
parent
1f6e6d1098
commit
5239e5f9cc
3 changed files with 20 additions and 20 deletions
|
@ -6,13 +6,13 @@ class ExtractorModel {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model for raw Discord Player extractors
|
* Model for raw Discord Player extractors
|
||||||
* @param {String} extractorName Name of the extractor
|
* @param {string} extractorName Name of the extractor
|
||||||
* @param {Object} data Extractor object
|
* @param {object} data Extractor object
|
||||||
*/
|
*/
|
||||||
constructor(extractorName: string, data: any) {
|
constructor(extractorName: string, data: any) {
|
||||||
/**
|
/**
|
||||||
* The extractor name
|
* The extractor name
|
||||||
* @type {String}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
this.name = extractorName;
|
this.name = extractorName;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ class ExtractorModel {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to handle requests from `Player.play()`
|
* Method to handle requests from `Player.play()`
|
||||||
* @param {String} query Query to handle
|
* @param {string} query Query to handle
|
||||||
* @returns {Promise<ExtractorModelData>}
|
* @returns {Promise<ExtractorModelData>}
|
||||||
*/
|
*/
|
||||||
async handle(query: string): Promise<ExtractorModelData> {
|
async handle(query: string): Promise<ExtractorModelData> {
|
||||||
|
@ -42,8 +42,8 @@ class ExtractorModel {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method used by Discord Player to validate query with this extractor
|
* Method used by Discord Player to validate query with this extractor
|
||||||
* @param {String} query The query to validate
|
* @param {string} query The query to validate
|
||||||
* @returns {Boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
validate(query: string): boolean {
|
validate(query: string): boolean {
|
||||||
return Boolean(this._raw.validate(query));
|
return Boolean(this._raw.validate(query));
|
||||||
|
@ -51,7 +51,7 @@ class ExtractorModel {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The extractor version
|
* The extractor version
|
||||||
* @type {String}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
get version(): string {
|
get version(): string {
|
||||||
return this._raw.version ?? "0.0.0";
|
return this._raw.version ?? "0.0.0";
|
||||||
|
@ -59,7 +59,7 @@ class ExtractorModel {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If player should mark this extractor as important
|
* If player should mark this extractor as important
|
||||||
* @type {Boolean}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
get important(): boolean {
|
get important(): boolean {
|
||||||
return Boolean(this._raw.important);
|
return Boolean(this._raw.important);
|
||||||
|
|
|
@ -50,7 +50,7 @@ class Queue<T = unknown> {
|
||||||
const connection = await this.player.voiceUtils.connect(channel);
|
const connection = await this.player.voiceUtils.connect(channel);
|
||||||
this.connection = connection;
|
this.connection = connection;
|
||||||
|
|
||||||
if (channel.type === "stage") await channel.guild.me.voice.setRequestToSpeak(true).catch((e) => {});
|
if (channel.type === "stage") await channel.guild.me.voice.setRequestToSpeak(true).catch(() => {});
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,43 +33,43 @@ class Track {
|
||||||
/**
|
/**
|
||||||
* Title of this track
|
* Title of this track
|
||||||
* @name Track#title
|
* @name Track#title
|
||||||
* @type {String}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of this track
|
* Description of this track
|
||||||
* @name Track#description
|
* @name Track#description
|
||||||
* @type {String}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Author of this track
|
* Author of this track
|
||||||
* @name Track#author
|
* @name Track#author
|
||||||
* @type {String}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* URL of this track
|
* URL of this track
|
||||||
* @name Track#url
|
* @name Track#url
|
||||||
* @type {String}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Thumbnail of this track
|
* Thumbnail of this track
|
||||||
* @name Track#thumbnail
|
* @name Track#thumbnail
|
||||||
* @type {String}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Duration of this track
|
* Duration of this track
|
||||||
* @name Track#duration
|
* @name Track#duration
|
||||||
* @type {String}
|
* @type {string}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Views count of this track
|
* Views count of this track
|
||||||
* @name Track#views
|
* @name Track#views
|
||||||
* @type {Number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -81,7 +81,7 @@ class Track {
|
||||||
/**
|
/**
|
||||||
* If this track belongs to playlist
|
* If this track belongs to playlist
|
||||||
* @name Track#fromPlaylist
|
* @name Track#fromPlaylist
|
||||||
* @type {Boolean}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -117,7 +117,7 @@ class Track {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The track duration in millisecond
|
* The track duration in millisecond
|
||||||
* @type {Number}
|
* @type {number}
|
||||||
*/
|
*/
|
||||||
get durationMS(): number {
|
get durationMS(): number {
|
||||||
const times = (n: number, t: number) => {
|
const times = (n: number, t: number) => {
|
||||||
|
@ -143,7 +143,7 @@ class Track {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* String representation of this track
|
* String representation of this track
|
||||||
* @returns {String}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
toString(): string {
|
toString(): string {
|
||||||
return `${this.title} by ${this.author}`;
|
return `${this.title} by ${this.author}`;
|
||||||
|
@ -151,7 +151,7 @@ class Track {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Raw JSON representation of this track
|
* Raw JSON representation of this track
|
||||||
* @returns {Object}
|
* @returns {object}
|
||||||
*/
|
*/
|
||||||
toJSON() {
|
toJSON() {
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in a new issue