diff --git a/.env.example b/.env.example index 8421bf7..9068157 100755 --- a/.env.example +++ b/.env.example @@ -4,4 +4,8 @@ HCAPTCHA_SECRET=hcaptcha ANNOUNCEMENT_KEY=text. GROQ_API_KEY=["groq_api"] NTFY_ALERT=ntfy_channel -DATA_PATH=where_to_store_data \ No newline at end of file +DATA_PATH=where_to_store_data +NODE_ENV=production +DISCORD_AI_WEBHOOK=discord_webhook_url +PROCESSING_SERVER=https://git.ceres.rip/selenite/processing +PROCESSING_SERVER_SECRET=secret \ No newline at end of file diff --git a/accounts/friend.js b/accounts/friend.js index 45f798e..8ad6efb 100755 --- a/accounts/friend.js +++ b/accounts/friend.js @@ -1,3 +1,3 @@ -import { accs, friends } from "../database.js"; +// import { accs, friends } from "../database.js"; export { }; \ No newline at end of file diff --git a/accounts/music.js b/accounts/music.js new file mode 100644 index 0000000..5492fc1 --- /dev/null +++ b/accounts/music.js @@ -0,0 +1,153 @@ +import Soundcloud from 'lucida/streamers/soundcloud/main.js' +let clientId = process.env.SOUNDCLOUD_CLIENT_ID; + +let sc = new Soundcloud({ + // oauthToken: clientId +}) + +async function search(query) { + let data = sc.search(query); + return data; +} +// so um fuck lucida +// based on https://github.com/imputnet/cobalt/blob/58ea4aed01383ead74d5e32e75335eddc2f015be/api/src/processing/services/soundcloud.js + +const cachedID = { + version: '', + id: '' +} + +async function findClientID() { + try { + const sc = await fetch('https://soundcloud.com/').then(r => r.text()).catch(() => {}); + const scVersion = String(sc.match(/ - + + + + + + + + + + + - + - - + + + -