From b7354e28df459808b7fda68a533c15cfdd9c3599 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Tue, 9 Mar 2021 20:01:45 -0500 Subject: [PATCH] Fix lint --- commands/games-sp/guess-song.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/games-sp/guess-song.js b/commands/games-sp/guess-song.js index 577e9f52..ac9e6320 100644 --- a/commands/games-sp/guess-song.js +++ b/commands/games-sp/guess-song.js @@ -83,7 +83,7 @@ module.exports = class GuessSongCommand extends Command { const { text } = await request.get('https://spotifycharts.com/regional/us/daily/latest/download'); return new Promise((res, rej) => { csvParse(text, { comment: '#' }, (err, output) => { - if (err) return rej(error); + if (err) return rej(err); this.charts = output.slice(2).map(song => song[4].replace('https://open.spotify.com/track/', '')); setTimeout(() => { this.charts = null; }, 4.32e+7); return res(this.charts); @@ -91,7 +91,7 @@ module.exports = class GuessSongCommand extends Command { }); } - async fetchRandomSong() { + fetchRandomSong() { const songs = [...this.charts, otherSongs]; const choice = songs[Math.floor(Math.random() * songs.length)]; return choice;