History, sync and export

Copy your full scrobble history into the bot, ask questions with dates in them, and download the whole thing as a CSV.

Last.fm's API knows how much you've played something. It's much worse at when. There's no way to ask it for a real calendar year, and its own per-artist history endpoint no longer exists. So Righteous can walk your entire scrobble history into its own store, once, and answer date questions from there instead.

Syncing is Self Premium. This guide covers the sync, what it unlocks, how to write a date range, and how to get your data back out or delete it.

Sync your history

Run ,lastfm update history, or /lastfm update with the history action.

It walks your account newest to oldest and stores one row per scrobble. A large account takes a while and shows progress as it goes. It's resumable — if it's interrupted, running it again picks up where it stopped rather than starting over.

The report tells you if it came up short

Deep paging on Last.fm's side can miss rows, so the result says how many scrobbles were stored against how many Last.fm reports. It is never rounded up to "complete". If the two disagree, run ,lastfm update resync to re-read everything from scratch.

The full walk has its own cooldown, separate from the command's normal one, because it's a lot of requests. That cooldown is charged when the run will actually walk, so an ordinary top-up isn't affected by it.

Keep it current without thinking about it

Once a sync has finished, the plain free ,lastfm update also tops your history up with anything new. That's on by default, it's a couple of requests rather than a full walk, and you can turn it off on the History page of /lastfm settings panel.

It does nothing at all for anyone without a finished sync, so it can't cost you anything before you have one.

Know which commands need it

Most of the family answers without a sync, from Last.fm directly. What changes is precision and reach.

Works either wayWhat a sync adds
milestoneNothing. The unsynced answer is exact too, only read from Last.fm
lastWithout a sync it searches back a bounded distance and states the bound rather than claiming "never"
gapsThe date you last played each artist
discoveriesOn a large library the unsynced path refuses rather than guessing
yearThe monthly breakdown, the listening clock and the discovered-this-year view
clockYour whole history instead of a recent sample
recent and streaksAdd the word history to read the local copy — far more rows, and your longest runs ever
ap, alp, spFirst-played and last-played dates alongside the count
profileA real "listening since" date, rather than the account's registration date

These five need a sync and refuse without one, because there's no honest fallback:

CommandAnswers
,lastfm first <target> [person]The first time you ever scrobbled an artist, album or track
,lastfm timeline <target> [range:<range>] [person]Every individual play of one target, newest first
,lastfm onthisday [date] [person]What you played on this date in past years
,lastfm pace [person]Your real scrobbling rate
,lastfm movers [range] [type] [person]What rose and fell between two windows

Every command in both tables is Self Premium, except the ones that were already free — recent, streaks, clock, profile and the three play-count commands.

Each command that can read from either source says in its footer which one it used. A listening clock built from a recent sample and one built from a whole history look identical and mean very different things.

Write a date range

Most of these take a window. The accepted shapes:

WriteMeans
2024That calendar year
2024-03That month
2024-03-07That day
june or june 2023A month by name
30d, 6m, 1y, 2wA rolling window ending now
last 90 daysThe same, spelled out
2023-01-01 to 2023-06-30An explicit span. .. works instead of to
allEverything

Boundaries are cut in your timezone, so "2024" means your 2024. Set yours with ,lastfm timezone.

Put the range last when the target could be mistaken for a date

A lot of music is named like a date. 1989, 2001 and June are all real titles, and a bare token can't tell which you meant. ,lastfm timeline therefore takes its window as an explicit range:2024 at the very end of the command, and everything before it is the target. The same range: marker settles the ambiguity on ,lastfm ttt and ,lastfm tta.

A ranged command that finds no synced history generally falls back to all time and tells you it did. The five that need a sync don't, because there's nothing to fall back to — there's no all-time answer to "what changed" or "what did I play on this day".

Ask when something happened

,lastfm first and ,lastfm last are the two ends of one list. ,lastfm timeline is the middle — every play in between, paged.

All three take an artist on its own, or album - artist, or track - artist. On slash the two halves are separate boxes. Righteous works out which way round you meant it by checking both against your own history, so Last Last - Burna Boy doesn't need you to remember the convention.

Leave the target off entirely and Righteous uses what you're playing. Mention someone with no target and the question becomes "how many times have you played what I'm listening to", answered from their history.

,lastfm milestone [number] [person] names your Nth scrobble and when it happened. ,lastfm onthisday replays this calendar date across every year you have.

Ask how much, and what changed

,lastfm pace measures your real scrobbling rate from the history rather than projecting it from a sample.

,lastfm year [yyyy] [person] is the calendar-year recap — top artists, albums, tracks and what you discovered.

,lastfm discoveries [range] [person] lists artists you played for the first time in a window. ,lastfm gaps [duration] [person] is the reverse — artists you played a lot and then stopped.

,lastfm movers is the only command here that compares two windows against each other. It shows what rose, what fell, what arrived and what dropped off.

WriteCompares
,lastfm moversThe last 30 days against the 30 before
,lastfm movers 20252025 against 2024
,lastfm movers 6mThe last six months against the six before
,lastfm movers from:2024 to:2025Two windows you name. Prefix only

Add artists, albums or tracks to change what it ranks. A calendar range is stepped on the calendar rather than by its own length, so 2025 is compared with the whole of 2024 and not with 365 days ending in early January.

Download your scrobbles

,lastfm export [range] hands your history back as a CSV attachment, one row per scrobble, with the played-at time in both readable and Unix form alongside the artist, track and album.

An export is always your own. There is deliberately no way to export somebody else's listening history.

A whole large account is bigger than Discord will carry in one upload. Rather than truncating and handing you a file that looks complete, Righteous counts the rows first and refuses with the number, so you can ask for a narrower range: ,lastfm export 2024, ,lastfm export 6m, ,lastfm export 2023-01-01 to 2023-06-30.

Delete it

,lastfm update purge confirm deletes your synced scrobble history and keeps your account linked. Use it if you want the storage gone but still want now-playing and WhoKnows to work.

,lastfm reset confirm goes further — it unlinks the account and deletes the cached library as well as the history.

Linking a different Last.fm username also purges the stored history automatically, because those plays belong to somebody else.

Common issues

"No synced history yet." The command needs the local copy. Run ,lastfm update history first.

The sync stopped part way. Run it again. It resumes from where it left off rather than re-walking what it already has.

Stored fewer scrobbles than Last.fm reports. That's the shortfall notice, and it's shown rather than hidden. ,lastfm update resync re-reads the whole account.

A range command answered for all time instead. It found no synced history and fell back, which it says in the reply. Sync, then ask again.

,lastfm timeline The 1975 found the wrong thing. The trailing number parsed as a year. Write ,lastfm timeline The 1975 range:2024, or leave the range off entirely.

"That range is too big for one file." The export won't fit in one Discord upload. Ask for a narrower window — the message tells you how many rows it was going to be.

A milestone or pace answer is missing. Some answers are withheld until a sync finishes, because the walk runs newest to oldest and a partial history holds your most recent plays. Counting your ten-thousandth scrobble from a partial copy would name the wrong track with total confidence.