A Discord bot that generates collages out of Last.fm listening history.
Requires Python >3.9
If using pyenv, this can be installed
automatically using pyenv install.
All dependencies are managed by the Poetry packaging and dependency manager, which can be installed by following their installation instructions.
Having installed Poetry, run
$ poetry installto install the dependencies.
This interfaces with both Discord and Last.FM so needs access to both. The
configuration may be set as either environment variables or written in a
.env file for automatic loading by dotenv. See the .env.sample for the
required variables and details on what to populate them with.
- Create a Last.FM API account.
- This only needs a contact email and an application name, all other fields are optional.
- Set the
LASTFM_API_KEYvariable in.envor an environment variable.
This is a bit more complicated:
- Make a Discord app.
- In the new app, create a bot using the bot menu in the sidebar.
- Copy the bot token and store it in the
DISCORD_TOKENvariable as with theLASTFM_API_KEYabove. - Go to the OAuth2 menu (URL Generator submenu) in the sidebar
- Scroll down to the Scopes table and select bot and applications.commands.
- In the Bot Permissions table, tick the Send Messages, Read Message History, Attach Files and Use Slash Commands boxes.
- Visit the generated link at the bottom of the Scopes table and invite the bot to join the servers (guilds) you want it in.
- NOTE: You can only add the bot to servers that you have permission for. You may need an admin on certain servers add the bot for you.
coming soon