player env utils

This commit is contained in:
Snowflake107 2021-05-11 19:50:00 +05:45
parent 262dbe23e7
commit 1ca22167ef

View file

@ -2,17 +2,30 @@
import { Store, Client } from 'soundcloud-scraper';
import { YouTube } from 'youtube-sr';
/**
* Utility env
*/
export class Env {
/**
* The soundcloud client
*/
static get SoundcloudClient() {
return Client;
}
/**
* The soundcloud store utils
*/
static get SoundcloudStore() {
const store = Store as Map<string, string>;
const setAPIkey = (newKey: string) => store.set('SOUNDCLOUD_API_KEY', newKey);
return { setAPIkey };
}
/**
* The youtube search
*/
static get youtube() {
return YouTube;
}