env utils

This commit is contained in:
Snowflake107 2021-05-11 19:54:13 +05:45
parent bc5249cc37
commit 8d45b12674

View file

@ -6,21 +6,23 @@ import { YouTube } from 'youtube-sr';
* Utility env
*/
export class Env {
/**
* The soundcloud client
* @example const sc = new (require("discord-player")).Env.SoundcloudClient.Client();
* sc.search("faded").then(console.log);
*/
static get SoundcloudClient() {
return Client;
return { Client };
}
/**
* The soundcloud store utils
* @example const store = require("discord-player").Env.SoundcloudStore.setAPIkey("soundcloud_api_key")
*/
static get SoundcloudStore() {
const store = Store as Map<string, string>;
const setAPIkey = (newKey: string) => store.set('SOUNDCLOUD_API_KEY', newKey);
return { setAPIkey };
return { setAPIkey, store };
}
/**