use songlink api key

This commit is contained in:
derpystuff 2023-08-07 00:04:22 +02:00
parent 9967194bc8
commit 6062476fd0

View file

@ -32,6 +32,10 @@ module.exports = {
let urls = msg.content.match(urlr)
if (urls) {
let songlink = await superagent.get(`https://api.song.link/v1-alpha.1/links?url=${encodeURIComponent(urls[0])}`)
.query({
url: urls[0],
key: process.env.SONGLINK_KEY
})
let song = songlink.body.entitiesByUniqueId[songlink.body.entityUniqueId]
let btns = renderMusicButtons(songlink.body.linksByPlatform)