fmtt: fix time period not working

This commit is contained in:
SileNce5k 2024-03-07 12:40:56 +01:00
parent 3c7d0a6c28
commit 3ed4714457
No known key found for this signature in database
GPG key ID: 961132EB78C8915F

View file

@ -25,7 +25,7 @@ module.exports = async function (userID, option) {
const apiKey = process.env.LAST_FM_API_KEY;
if(lastfmUsername != undefined){
tracks = await new Promise ((resolve, reject) => {
fetch(`https://ws.audioscrobbler.com/2.0/?method=user.gettoptracks&user=${lastfmUsername}&period${option[0]}&api_key=${apiKey}&format=json`)
fetch(`https://ws.audioscrobbler.com/2.0/?method=user.gettoptracks&user=${lastfmUsername}&period=${option[0]}&api_key=${apiKey}&format=json`)
.then(response => response.json())
.then(data => {
for(let i = 0; i < 10; i++){