mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 14:18:36 +02:00
Clear song cache every 12 hours
This commit is contained in:
@@ -86,7 +86,10 @@ module.exports = class GuessSongCommand extends Command {
|
|||||||
csvParse(text, { comment: '#' }, (err, output) => {
|
csvParse(text, { comment: '#' }, (err, output) => {
|
||||||
if (err) return rej(err);
|
if (err) return rej(err);
|
||||||
this.charts = output.slice(2).map(song => song[4].replace('https://open.spotify.com/track/', ''));
|
this.charts = output.slice(2).map(song => song[4].replace('https://open.spotify.com/track/', ''));
|
||||||
setTimeout(() => { this.charts = null; }, 4.32e+7);
|
setTimeout(() => {
|
||||||
|
this.charts = null;
|
||||||
|
this.cache.clear();
|
||||||
|
}, 4.32e+7);
|
||||||
return res(this.charts);
|
return res(this.charts);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user