mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-23 21:52:45 -05:00
feat: add Last.fm integration with auto-scrobbling
- Add LastFmManager with full Last.fm API auth flow (get token → user authorises → get session key stored in MySQL) - Add %lastfm command (aliases: lf, lfm) with subcommands: link, confirm, unlink, np, profile, loved, top, recent, scrobble - Auto-scrobble in PlayerManager: sends now-playing notification to all human voice-channel members on track start, then defers a scrobble after the configured threshold (default 50% of duration or 4 min, whichever comes first) - Add lastfm config block to config_example.json (apiKey, apiSecret, scrobbleThreshold, scrobbleMinMs) - Add all Last.fm locale strings to storage/locales/bot/en.json fix: show channel as Discord mention in inactivity leave message - RecoveryManager: changed plain activeChannelId to <#activeChannelId> so it renders as a clickable channel link
This commit is contained in:
1 parent
09fa5d160c
commit
8ac0dde343
8 files changed
+960
-3
No files matched your search
@@ -76,6 +76,14 @@
|
||||
},
|
||||
"sessionSecret": "secret for the expressjs session middleware; https://www.npmjs.com/package/express-session#user-content-secret",
|
||||
"geniusToken": "Genius access token (Used for lyrics); optional",
|
||||
"lastfm": {
|
||||
"Comment": "Last.fm integration: auto-scrobble songs, play loved/top/recent tracks. Register at https://www.last.fm/api/account/create",
|
||||
"apiKey": "your_lastfm_api_key",
|
||||
"apiSecret": "your_lastfm_api_secret",
|
||||
"scrobbleThreshold": 0.5,
|
||||
"scrobbleMinMs": 240000,
|
||||
"Comment2": "scrobbleThreshold: fraction of track duration before scrobbling (0.5 = 50%). scrobbleMinMs: minimum ms played before scrobble (default 4 min). Both must be met."
|
||||
},
|
||||
"owners": ["user id for owner-only commands", "another user id"],
|
||||
"playerAFKTimeout": 60000,
|
||||
"Comment": "The above specifies the time in ms after which a player goes inactive; Optional.",
|
||||
|
||||
Reference in new issue
Block a user