diff --git a/lastfm/plugin.js b/lastfm/plugin.js index 1673f28..e593597 100644 --- a/lastfm/plugin.js +++ b/lastfm/plugin.js @@ -64,14 +64,11 @@ } const res = await post({ url: `/applications/${DISCORD_APP_ID}/external-assets`, - body: JSON.stringify({ urls: [url] }), - oldFormErrors: false, - headers: { - "Content-Type": "application/json" - } + body: { urls: [url] }, + oldFormErrors: false }); if (res.ok) { - const path = JSON.parse(res.body)[0].external_asset_path; + const path = "mp:" + res.body[0].external_asset_path; cache.set(url, path); return path; } @@ -214,7 +211,6 @@ // plugins/lastfm/index.ts var { - // @ts-expect-error plugin: { store: store2 }, flux: { storesFlat, dispatcher } } = shelter; diff --git a/lastfm/plugin.json b/lastfm/plugin.json index 361d51f..b647e9c 100644 --- a/lastfm/plugin.json +++ b/lastfm/plugin.json @@ -1 +1 @@ -{"name":"Last.fm Presence","author":"Yellowsink","description":"Shows your Last.fm now listening as a presence","hash":"a7c2f783a05c554fcc0642f9182e19ef"} \ No newline at end of file +{"name":"Last.fm Presence","author":"Yellowsink","description":"Shows your Last.fm now listening as a presence","hash":"1c4bcb05a77ec2e21f0d6732d2d1378e"} \ No newline at end of file