fix documentaiton
This commit is contained in:
parent
8d45b12674
commit
76471b4fa8
1 changed files with 11 additions and 3 deletions
|
@ -2,14 +2,20 @@
|
||||||
import { Store, Client } from 'soundcloud-scraper';
|
import { Store, Client } from 'soundcloud-scraper';
|
||||||
import { YouTube } from 'youtube-sr';
|
import { YouTube } from 'youtube-sr';
|
||||||
|
|
||||||
|
export class Env {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility env
|
* Utility env
|
||||||
*/
|
*/
|
||||||
export class Env {
|
constructor() {
|
||||||
|
throw new Error(`Cannot instantiate the class ${this.constructor.name}`);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The soundcloud client
|
* The soundcloud client
|
||||||
* @example const sc = new (require("discord-player")).Env.SoundcloudClient.Client();
|
* @example const sc = new (require("discord-player")).Env.SoundcloudClient.Client();
|
||||||
* sc.search("faded").then(console.log);
|
* sc.search("faded").then(console.log);
|
||||||
|
* @type {Object}
|
||||||
*/
|
*/
|
||||||
static get SoundcloudClient() {
|
static get SoundcloudClient() {
|
||||||
return { Client };
|
return { Client };
|
||||||
|
@ -18,6 +24,7 @@ export class Env {
|
||||||
/**
|
/**
|
||||||
* The soundcloud store utils
|
* The soundcloud store utils
|
||||||
* @example const store = require("discord-player").Env.SoundcloudStore.setAPIkey("soundcloud_api_key")
|
* @example const store = require("discord-player").Env.SoundcloudStore.setAPIkey("soundcloud_api_key")
|
||||||
|
* @type {Object}
|
||||||
*/
|
*/
|
||||||
static get SoundcloudStore() {
|
static get SoundcloudStore() {
|
||||||
const store = Store as Map<string, string>;
|
const store = Store as Map<string, string>;
|
||||||
|
@ -27,6 +34,7 @@ export class Env {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The youtube search
|
* The youtube search
|
||||||
|
* @type {YouTube}
|
||||||
*/
|
*/
|
||||||
static get youtube() {
|
static get youtube() {
|
||||||
return YouTube;
|
return YouTube;
|
||||||
|
|
Loading…
Reference in a new issue