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
|
||||
* @param {String} extractorName Name of the extractor
|
||||
* @param {Object} data Extractor object
|
||||
* @param {string} extractorName Name of the extractor
|
||||
* @param {object} data Extractor object
|
||||
*/
|
||||
constructor(extractorName: string, data: any) {
|
||||
/**
|
||||
* The extractor name
|
||||
* @type {String}
|
||||
* @type {string}
|
||||
*/
|
||||
this.name = extractorName;
|
||||
|
||||
|
@ -21,7 +21,7 @@ class ExtractorModel {
|
|||
|
||||
/**
|
||||
* Method to handle requests from `Player.play()`
|
||||
* @param {String} query Query to handle
|
||||
* @param {string} query Query to handle
|
||||
* @returns {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
|
||||
* @param {String} query The query to validate
|
||||
* @returns {Boolean}
|
||||
* @param {string} query The query to validate
|
||||
* @returns {boolean}
|
||||
*/
|
||||
validate(query: string): boolean {
|
||||
return Boolean(this._raw.validate(query));
|
||||
|
@ -51,7 +51,7 @@ class ExtractorModel {
|
|||
|
||||
/**
|
||||
* The extractor version
|
||||
* @type {String}
|
||||
* @type {string}
|
||||
*/
|
||||
get version(): string {
|
||||
return this._raw.version ?? "0.0.0";
|
||||
|
@ -59,7 +59,7 @@ class ExtractorModel {
|
|||
|
||||
/**
|
||||
* If player should mark this extractor as important
|
||||
* @type {Boolean}
|
||||
* @type {boolean}
|
||||
*/
|
||||
get important(): boolean {
|
||||
return Boolean(this._raw.important);
|
||||
|
|
|
@ -50,7 +50,7 @@ class Queue<T = unknown> {
|
|||
const connection = await this.player.voiceUtils.connect(channel);
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -33,43 +33,43 @@ class Track {
|
|||
/**
|
||||
* Title of this track
|
||||
* @name Track#title
|
||||
* @type {String}
|
||||
* @type {string}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Description of this track
|
||||
* @name Track#description
|
||||
* @type {String}
|
||||
* @type {string}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Author of this track
|
||||
* @name Track#author
|
||||
* @type {String}
|
||||
* @type {string}
|
||||
*/
|
||||
|
||||
/**
|
||||
* URL of this track
|
||||
* @name Track#url
|
||||
* @type {String}
|
||||
* @type {string}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Thumbnail of this track
|
||||
* @name Track#thumbnail
|
||||
* @type {String}
|
||||
* @type {string}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Duration of this track
|
||||
* @name Track#duration
|
||||
* @type {String}
|
||||
* @type {string}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Views count of this track
|
||||
* @name Track#views
|
||||
* @type {Number}
|
||||
* @type {number}
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -81,7 +81,7 @@ class Track {
|
|||
/**
|
||||
* If this track belongs to playlist
|
||||
* @name Track#fromPlaylist
|
||||
* @type {Boolean}
|
||||
* @type {boolean}
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -117,7 +117,7 @@ class Track {
|
|||
|
||||
/**
|
||||
* The track duration in millisecond
|
||||
* @type {Number}
|
||||
* @type {number}
|
||||
*/
|
||||
get durationMS(): number {
|
||||
const times = (n: number, t: number) => {
|
||||
|
@ -143,7 +143,7 @@ class Track {
|
|||
|
||||
/**
|
||||
* String representation of this track
|
||||
* @returns {String}
|
||||
* @returns {string}
|
||||
*/
|
||||
toString(): string {
|
||||
return `${this.title} by ${this.author}`;
|
||||
|
@ -151,7 +151,7 @@ class Track {
|
|||
|
||||
/**
|
||||
* Raw JSON representation of this track
|
||||
* @returns {Object}
|
||||
* @returns {object}
|
||||
*/
|
||||
toJSON() {
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue