env utils
This commit is contained in:
parent
bc5249cc37
commit
8d45b12674
1 changed files with 5 additions and 3 deletions
|
@ -6,21 +6,23 @@ import { YouTube } from 'youtube-sr';
|
||||||
* Utility env
|
* Utility env
|
||||||
*/
|
*/
|
||||||
export class Env {
|
export class Env {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The soundcloud client
|
* The soundcloud client
|
||||||
|
* @example const sc = new (require("discord-player")).Env.SoundcloudClient.Client();
|
||||||
|
* sc.search("faded").then(console.log);
|
||||||
*/
|
*/
|
||||||
static get SoundcloudClient() {
|
static get SoundcloudClient() {
|
||||||
return Client;
|
return { Client };
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The soundcloud store utils
|
* The soundcloud store utils
|
||||||
|
* @example const store = require("discord-player").Env.SoundcloudStore.setAPIkey("soundcloud_api_key")
|
||||||
*/
|
*/
|
||||||
static get SoundcloudStore() {
|
static get SoundcloudStore() {
|
||||||
const store = Store as Map<string, string>;
|
const store = Store as Map<string, string>;
|
||||||
const setAPIkey = (newKey: string) => store.set('SOUNDCLOUD_API_KEY', newKey);
|
const setAPIkey = (newKey: string) => store.set('SOUNDCLOUD_API_KEY', newKey);
|
||||||
return { setAPIkey };
|
return { setAPIkey, store };
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue