FM: Add a toptracks feature

This commit is contained in:
SileNce5k 2024-03-07 11:18:21 +01:00
parent 5b202ae9d3
commit 51e810264c
No known key found for this signature in database
GPG key ID: 961132EB78C8915F
2 changed files with 42 additions and 1 deletions

View file

@ -1,6 +1,6 @@
const fmlogin = require("../../util/lastfm/fmlogin");
const getCurrentScrobble = require("../../util/lastfm/getCurrentScrobble");
const getTopTracks = require("../../util/lastfm/getTopTracks");
module.exports = {
name: 'fm',
description: 'Last fm commands. See `<prefix>help fm` for more info.',
@ -14,6 +14,9 @@ module.exports = {
case "set":
sendText = await fmlogin(message.author.id, args[1]);
break;
case "toptracks":
case "tt":
sendText = await getTopTracks(message.author.id, args);
default:
break;
}